-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
66 lines (57 loc) · 1.12 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
FROM python:3.7-alpine AS aucr
RUN adduser -D aucr
RUN mkdir /opt/aucr/
ENV FLASK_APP=aucr.py
COPY requirements.txt /opt/aucr
WORKDIR /opt/aucr
RUN apk update
RUN apk upgrade
RUN apk add --no-cache \
gcc \
libc-dev \
musl-dev \
linux-headers \
libffi-dev \
py-pillow \
python3-dev \
openssl \
file \
jansson \
bison \
tini \
su-exec \
g++ \
lapack-dev \
gfortran \
build-base \
git \
p7zip \
postgresql-dev \
&& pip install psycopg2-binary python-dotenv \
&& pip install -r /opt/aucr/requirements.txt \
&& apk del --purge gcc \
libc-dev \
musl-dev \
linux-headers \
libffi-dev \
py-pillow \
gfortran \
g++ \
python3-dev \
build-base \
gcc \
git
COPY aucr.py /opt/aucr
COPY aucr_app /opt/aucr/aucr_app
COPY babel.cfg /opt/aucr
COPY LICENSE /opt/aucr
COPY projectinfo.yml /opt/aucr
COPY config.py /opt/aucr
COPY upload /opt/aucr/upload
COPY migrations /opt/aucr/migrations
COPY boot.sh /opt/aucr/
RUN chmod a+x /opt/aucr/boot.sh
RUN chown -R aucr:aucr /opt/
USER aucr
EXPOSE 5000
ENTRYPOINT ["./boot.sh"]