forked from biswaz/rescuekerala
-
Notifications
You must be signed in to change notification settings - Fork 575
/
Dockerfile
30 lines (19 loc) · 614 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
FROM python:3.7-slim-buster
ENV PYTHONUNBUFFERED 1
RUN apt-get update \
&& apt-get install -y netcat \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*
RUN addgroup --system django \
&& adduser --system --ingroup django django
COPY requirements.txt /requirements/
RUN pip install --no-cache-dir -r /requirements/requirements.txt \
&& rm -rf /requirements
COPY ./start /start
RUN sed -i 's/\r$//g' /start
RUN chmod +x /start
RUN chown django /start
COPY --chown=django:django . /app
USER django
WORKDIR /app
EXPOSE 9000