-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (22 loc) · 729 Bytes
/
Dockerfile
File metadata and controls
26 lines (22 loc) · 729 Bytes
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
FROM python:3.8.5-alpine
MAINTAINER JvitorS23
ENV PYTHONUNBUFFERED 1
COPY ./requirements.txt /requirements.txt
COPY ./requirements-dev.txt /requirements-dev.txt
RUN apk add --update --no-cache postgresql-client
RUN apk add --update --no-cache --virtual .tmp-build-deps \
gcc libc-dev linux-headers postgresql-dev musl-dev zlib zlib-dev
RUN pip install -r /requirements.txt
RUN pip install -r /requirements-dev.txt
RUN apk del .tmp-build-deps
RUN apk update && apk add bash
RUN mkdir /app
WORKDIR /app
COPY ./my_file_explorer /app
RUN mkdir -p /vol/web/media
RUN mkdir -p /vol/web/static
# For security (don't run app with root user)
RUN adduser -D user
RUN chown -R user:user /vol/
RUN chmod -R 755 /vol/web
USER user