-
Notifications
You must be signed in to change notification settings - Fork 39
/
Dockerfile
33 lines (23 loc) · 888 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
FROM python:3.9-alpine
ARG VERSION
ARG VCS_REF
ARG BUILD_DATE
LABEL org.label-schema.schema-version="1.0" \
org.label-schema.vcs-url="https://github.com/dgk/django-business-logic/" \
org.label-schema.version="$VERSION" \
org.label-schema.vcs-ref="$VCS_REF" \
org.label-schema.build-date="$BUILD_DATE"
RUN mkdir /app
WORKDIR app
RUN apk add --no-cache libxslt && \
apk add --no-cache --virtual .build-deps g++ python3-dev libffi-dev openssl-dev libxslt-dev git
ADD . /app
RUN pip install --no-cache-dir -r requirements.dev.txt && \
python setup.py install && \
apk del .build-deps
RUN python manage.py migrate && \
python manage.py loaddata sites/dev/fixtures/data.json
RUN cat sites/dev/templates/ga.html >> business_logic/static/business_logic/index.html
EXPOSE 8000
ENTRYPOINT ["python", "manage.py"]
CMD ["runserver", "0.0.0.0:8000"]