-
Notifications
You must be signed in to change notification settings - Fork 16
/
Dockerfile
35 lines (27 loc) · 956 Bytes
/
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
FROM nikolaik/python-nodejs:python3.9-nodejs14
ENV PIP_NO_CACHE_DIR off
ENV PIP_DISABLE_PIP_VERSION_CHECK on
ENV PYTHONUNBUFFERED 1
ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE DontWarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN set -ex; \
apt-get update; \
# dependencies for building Python packages \
apt-get install -y build-essential; \
# psycopg2 dependencies \
apt-get install -y libpq-dev; \
# git for codecov file listing \
apt-get install -y git; \
# cleaning up unused files \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
# Copy, then install requirements before copying rest for a requirements cache layer.
RUN mkdir /app
COPY requirements.txt /app
RUN pip install -r /app/requirements.txt
COPY . /app
WORKDIR /app
RUN npm install -g yuglify@2.0.0
RUN python manage.py collectstatic --noinput
EXPOSE 5000
CMD /app/bin/start.sh