-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
78 lines (56 loc) · 1.88 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
67
68
69
70
71
72
73
74
75
76
77
78
FROM ubuntu:14.04
MAINTAINER Gluu Inc. <support@gluu.org>
# Ubuntu packages
RUN echo 'deb http://ppa.launchpad.net/nginx/stable/ubuntu trusty main' >> /etc/apt/sources.list.d/nginx.list \
&& echo 'deb-src http://ppa.launchpad.net/nginx/stable/ubuntu trusty main ' >> /etc/apt/sources.list.d/nginx.list \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C
RUN apt-get update \
&& apt-get install -y nginx openssl python python-pip wget \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# =====
# nginx
# =====
RUN mkdir -p /etc/certs
RUN openssl dhparam -out /etc/certs/dhparams.pem 2048
# forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log
# Ports for nginx
EXPOSE 80
EXPOSE 443
# ====
# tini
# ====
ENV TINI_VERSION v0.15.0
RUN wget -q https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini -O /tini \
&& chmod +x /tini
ENTRYPOINT ["/tini", "--"]
# ====
# gosu
# ====
ENV GOSU_VERSION 1.10
RUN wget -q https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-amd64 -O /usr/local/bin/gosu \
&& chmod +x /usr/local/bin/gosu
# ======
# Python
# ======
# Python packages
RUN pip install -U pip
# A workaround to address https://github.com/docker/docker-py/issues/1054
# and to make sure latest pip is being used, not from OS one
ENV PYTHONPATH="/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages"
RUN pip install "consulate==0.6.0"
# ==========
# misc stuff
# ==========
LABEL vendor="Gluu Federation"
ENV GLUU_OXAUTH_BACKEND localhost:8081
ENV GLUU_OXTRUST_BACKEND localhost:8082
ENV GLUU_KV_HOST localhost
ENV GLUU_KV_PORT 8500
RUN mkdir -p /opt/scripts /opt/templates
COPY templates /opt/templates/
COPY scripts /opt/scripts/
RUN chmod +x /opt/scripts/entrypoint.sh
CMD ["/opt/scripts/entrypoint.sh"]