-
Notifications
You must be signed in to change notification settings - Fork 15
/
Dockerfile-test
44 lines (35 loc) · 1.12 KB
/
Dockerfile-test
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
FROM nikolaik/python-nodejs:python3.9-nodejs21
ENV POETRY_VIRTUALENVS_CREATE false \
PIP_NO_CACHE_DIR off \
PIP_DISABLE_PIP_VERSION_CHECK on \
PYTHONUNBUFFERED 1 \
NODE_ENV production
ADD packages.txt /packages.txt
RUN set -ex; \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -; \
apt-get update; \
cat /packages.txt | grep -v \# | xargs apt-get install -y; \
# cleaning up unused files \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
RUN apt-get update && \
apt-get install -y chromium-driver
RUN pip install -U setuptools==69.0.2
ADD requirements.txt /requirements.txt
RUN pip install -r /requirements.txt
ADD requirements-test.txt /requirements-test.txt
RUN pip install -r /requirements-test.txt
ARG USER_ID=1001
ARG GROUP_ID=1001
RUN set -ex; \
addgroup --gid $GROUP_ID --system django; \
adduser --system --home /home/django --uid $USER_ID --gid $GROUP_ID django
USER django
COPY --chown=django:django . /app
WORKDIR /app
RUN set -ex; \
yarn; \
yarn build; \
yarn lint
EXPOSE 5000
CMD /app/bin/start-web.sh