forked from cloud-gov/django-uaa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (22 loc) · 835 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
FROM python:3.9
# This Dockerfile manually installs cg-django-uaa from a built
# distribution and sets up the example app to run. It can be used
# to verify that everything about the packaging of cg-django-uaa is
# working properly (e.g., that important data files aren't being left
# out of the built distribution).
ARG version
ARG django_version
RUN pip install django==${django_version}
COPY requirements-tests.txt /
RUN pip install -r /requirements-tests.txt
COPY dist/cg-django-uaa-${version}.tar.gz /
WORKDIR /
RUN pip install cg-django-uaa-${version}.tar.gz && \
python -m uaa_client.runtests
COPY example /example
WORKDIR /example
RUN python manage.py migrate && \
python manage.py createsuperuser --noinput \
--username foo --email [email protected]
EXPOSE 8000
CMD python manage.py runserver 0.0.0.0:8000