forked from archerysec/archerysec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-alpine
42 lines (31 loc) · 1.22 KB
/
Dockerfile-alpine
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
FROM python:3.8.7-alpine3.11
LABEL MAINTAINER="Anand Tiwari"
ENV DJANGO_SETTINGS_MODULE=archerysecurity.settings.base
# Set archerysec as a work directory.
WORKDIR /home/archerysec/app
# Copy all file to archerysec folder.
COPY . .
ADD ./docker-files/init.sh /home/archerysec/app/init.sh
RUN echo "http://dl-3.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories &&\
apk add --update --no-cache bash netcat-openbsd && \
adduser -h /home/archerysec/app -s /bin/bash archerysec -D archerysec && \
rm -rf /var/cache/apk/* && \
chown archerysec /home/archerysec/app && \
chgrp archerysec /home/archerysec/app && \
chown -R archerysec:archerysec /home/archerysec/app
RUN apk add --update --no-cache --virtual .build-deps \
g++ \
python-dev \
libxml2 \
bash \
libxml2-dev && \
apk add libxslt-dev && \
apk del .build-deps
RUN apk add --no-cache --virtual .build-deps \
ca-certificates gcc postgresql-dev linux-headers musl-dev \
libffi-dev jpeg-dev zlib-dev
RUN pip install --no-cache-dir -r requirements.txt
#Change to the archerysec user so things get done as the right person (apart from copy)
USER archerysec
EXPOSE 8000
CMD ["/home/archerysec/app/init.sh"]