-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
51 lines (38 loc) · 1.34 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
# <WARNING>
# Everything within sections like <TAG> is generated and can
# be automatically replaced on deployment. You can disable
# this functionality by simply removing the wrapping tags.
# </WARNING>
# <DOCKER_FROM>
FROM divio/base:2.2-py3.9-slim-buster
# </DOCKER_FROM>
WORKDIR /app
RUN apt-get update --yes --quiet && apt-get install --yes --quiet --no-install-recommends \
build-essential \
libpq-dev \
libmariadbclient-dev \
libjpeg62-turbo-dev \
zlib1g-dev \
libwebp-dev
RUN apt-get update \
&& apt-get install -y build-essential curl \
&& curl -sL https://deb.nodesource.com/setup_14.x | bash - \
&& apt-get install -y nodejs --no-install-recommends \
&& rm -rf /var/lib/apt/lists/* /usr/share/doc /usr/share/man \
&& apt-get clean \
&& useradd --create-home python \
&& chown python:python -R /app
USER python
COPY --chown=python:python requirements*.txt ./
RUN pip install -r requirements.txt
ENV DEBUG="${DEBUG}" \
PYTHONUNBUFFERED="true" \
PATH="${PATH}:/home/python/.local/bin" \
USER="python"
COPY --chown=python:python . .
WORKDIR /app
RUN DJANGO_MODE=build python manage.py collectstatic --noinput
#RUN python manage.py tailwind install --no-input;
#RUN python manage.py tailwind build --no-input;
#RUN python manage.py collectstatic --no-input;
#CMD ["python", "manage.py", "runserver"]