-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile_dev
executable file
·43 lines (34 loc) · 1.11 KB
/
Dockerfile_dev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#
# Docker file for Recipe site development server
#
# Build with
#
# docker build --build-arg UID=$UID -t <name>:<tag> -f <dockerfile> .
#
# For example if building a local version, you could do:
#
# docker build --build-arg UID=$UID -t local/recipe_site:dev -f Dockerfile_dev .
#
# To run an interactive shell inside this container, do:
#
# docker run -ti --entrypoint /bin/bash local/recipe_site:dev
#
FROM fnndsc/ubuntu-python3:latest
MAINTAINER jbernal0019 "[email protected]"
ENV VERSION="0.1"
# Pass a UID on build command line (see above) to set internal UID
ARG UID=1001
ENV UID=$UID
ENV APPROOT="/home/localuser/recipe_backend" REQPATH="/usr/src/requirements"
COPY ["./requirements", "${REQPATH}"]
COPY ["./docker-entrypoint.sh", "/usr/src"]
RUN apt-get update \
&& apt-get install -y libpq-dev \
&& pip3 install -r ${REQPATH}/local.txt \
&& useradd -u $UID -ms /bin/bash localuser
# Start as user localuser
USER localuser
WORKDIR $APPROOT
ENTRYPOINT ["/usr/src/docker-entrypoint.sh"]
EXPOSE 8080
#CMD ["manage.py", "runserver", "0.0.0.0:8010"]