-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
55 lines (37 loc) · 1.26 KB
/
Dockerfile
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
44
45
46
47
48
49
50
51
52
53
54
55
FROM python:3.10
ENV PYTHONUNBUFFERED=1
ARG WORKDIR=/wd
ARG USER=user
WORKDIR ${WORKDIR}
RUN useradd --system ${USER} && \
chown --recursive ${USER} ${WORKDIR}
RUN apt update && apt upgrade -y
# Copy_project_files__start
COPY --chown=${USER} requirements.txt requirements.txt
RUN pip install --upgrade pip && \
pip install --requirement requirements.txt
COPY --chown=${USER} --chmod=755 ./docker/app/start.sh /start.sh
COPY --chown=${USER} --chmod=755 ./docker/app/entrypoint.sh /entrypoint.sh
COPY --chown=${USER} ./manage.py manage.py
COPY --chown=${USER} ./Makefile Makefile
# Copy_project_files__stop
# Copy_apps__start
COPY --chown=${USER} ./core core
COPY --chown=${USER} ./admin_users admin_users
COPY --chown=${USER} ./base base
COPY --chown=${USER} ./greetings greetings
COPY --chown=${USER} ./phone_book phone_book
COPY --chown=${USER} ./users_generator users_generator
COPY --chown=${USER} ./session_app session_app
COPY --chown=${USER} ./accounts accounts
COPY --chown=${USER} ./middlewares middlewares
COPY --chown=${USER} ./drf_crud drf_crud
# Copy_apps__stop
# Copy_visual__start
COPY --chown=${USER} ./templates templates
COPY --chown=${USER} ./static static
# Copy_visual__stop
USER ${USER}
EXPOSE 8000
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/start.sh"]