-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
49 lines (36 loc) · 1.31 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
FROM pennlabs/shibboleth-sp-nginx:3.0.4
LABEL maintainer="Penn Labs"
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
WORKDIR /app/
# Install dependencies
RUN apt-get update \
&& apt-get install --no-install-recommends -y python3.7-dev python3-distutils libpq-dev gcc \
&& wget -qO get-pip.py "https://github.com/pypa/get-pip/raw/0c72a3b4ece313faccb446a96c84770ccedc5ec5/get-pip.py" \
&& python3.7 get-pip.py \
--disable-pip-version-check \
--no-cache-dir \
&& pip3 install pipenv \
&& rm -f get-pip.py \
&& rm -rf /var/lib/apt/lists/*
# Copy config files
COPY docker/shibboleth/ /etc/shibboleth/
COPY docker/nginx-default.conf /etc/nginx/conf.d/default.conf
COPY docker/shib_clear_headers /etc/nginx/
COPY docker/supervisord.conf /etc/supervisor/
# Copy project dependencies
COPY Pipfile* /app/
# Install project dependencies
RUN pipenv install --system
# Copy project files
COPY . /app/
ENV DJANGO_SETTINGS_MODULE Platform.settings.production
ENV SECRET_KEY 'temporary key just to build the docker image'
ENV IDENTITY_RSA_PRIVATE_KEY 'temporary private key just to build the docker image'
# Collect static files
RUN python3 /app/manage.py collectstatic --noinput
# Copy mime definitions
COPY docker/mime.types /etc/mime.types
# Copy start script
COPY docker/platform-run /usr/local/bin/
CMD ["platform-run"]