-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
50 lines (31 loc) · 946 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM python:3.8.4-alpine3.12
EXPOSE 8000
# Set environment varibles
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV PYTHONPATH=/usr/local/lib/python3.7/site-packages/:/code/
# System dependency installation
## Network
RUN apk add --update netcat-openbsd supervisor
## Timezone
RUN apk add tzdata
RUN cp /usr/share/zoneinfo/Australia/Melbourne /etc/localtime
RUN echo "Australia/Melbourne" > /etc/timezone
RUN date
RUN apk del tzdata
## Python Runtime
RUN apk update && apk add postgresql-dev gcc python3-dev musl-dev libffi-dev openssl-dev
RUN apk add jpeg-dev zlib-dev
RUN rm -rf /var/cache/apk/*
RUN mkdir /code
RUN chmod g+w /code
WORKDIR /code
COPY src/ /code/
COPY supervisord.conf /etc/supervisord.conf
RUN chmod g+w /code/static
RUN chmod g+w /code/media
# RUN ls -la /code/*
# Install dependencies
RUN pip3 install --upgrade pip
RUN pip3 install -r requirements.txt
#ENTRYPOINT ["sh", "alice-bootloader.sh" ]