-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
123 lines (96 loc) · 2.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
FROM alpine:3.9
# ===============
# Alpine packages
# ===============
RUN apk update \
&& apk add --no-cache py-pip \
&& apk add --no-cache --virtual build-deps wget git
# ===============
# Install python packages
# ===============
RUN pip install joblib
# ====
# Tini
# ====
RUN wget -q https://github.com/krallin/tini/releases/download/v0.18.0/tini-static -O /usr/bin/tini \
&& chmod +x /usr/bin/tini
# ======
# Python
# ======
COPY requirements.txt /tmp/requirements.txt
RUN pip install -U pip \
&& pip install --no-cache-dir -r /tmp/requirements.txt
# =======
# Cleanup
# =======
RUN apk del build-deps \
&& rm -rf /var/cache/apk/*
# =======
# License
# =======
RUN mkdir -p /licenses
COPY LICENSE /licenses/
# ==========
# Config ENV
# ==========
ENV GLUU_CONFIG_ADAPTER=consul \
GLUU_CONFIG_CONSUL_HOST=localhost \
GLUU_CONFIG_CONSUL_PORT=8500 \
GLUU_CONFIG_CONSUL_CONSISTENCY=stale \
GLUU_CONFIG_CONSUL_SCHEME=http \
GLUU_CONFIG_CONSUL_VERIFY=false \
GLUU_CONFIG_CONSUL_CACERT_FILE=/etc/certs/consul_ca.crt \
GLUU_CONFIG_CONSUL_CERT_FILE=/etc/certs/consul_client.crt \
GLUU_CONFIG_CONSUL_KEY_FILE=/etc/certs/consul_client.key \
GLUU_CONFIG_CONSUL_TOKEN_FILE=/etc/certs/consul_token \
GLUU_CONFIG_KUBERNETES_NAMESPACE=default \
GLUU_CONFIG_KUBERNETES_CONFIGMAP=gluu \
GLUU_CONFIG_KUBERNETES_USE_KUBE_CONFIG=false
# ==========
# Secret ENV
# ==========
ENV GLUU_SECRET_ADAPTER=vault \
GLUU_SECRET_VAULT_SCHEME=http \
GLUU_SECRET_VAULT_HOST=localhost \
GLUU_SECRET_VAULT_PORT=8200 \
GLUU_SECRET_VAULT_VERIFY=false \
GLUU_SECRET_VAULT_ROLE_ID_FILE=/etc/certs/vault_role_id \
GLUU_SECRET_VAULT_SECRET_ID_FILE=/etc/certs/vault_secret_id \
GLUU_SECRET_VAULT_CERT_FILE=/etc/certs/vault_client.crt \
GLUU_SECRET_VAULT_KEY_FILE=/etc/certs/vault_client.key \
GLUU_SECRET_VAULT_CACERT_FILE=/etc/certs/vault_ca.crt \
GLUU_SECRET_KUBERNETES_NAMESPACE=default \
GLUU_SECRET_KUBERNETES_SECRET=gluu \
GLUU_SECRET_KUBERNETES_USE_KUBE_CONFIG=false
# ===============
# Persistence ENV
# ===============
ENV GLUU_PERSISTENCE_TYPE=ldap \
GLUU_PERSISTENCE_LDAP_MAPPING=default \
GLUU_PERSISTENCE_LDAP_MAPPING=default \
GLUU_LDAP_URL=localhost:1636
# ===========
# Generic ENV
# ===========
ENV GLUU_CONTAINER_METADATA=docker \
GLUU_WAIT_MAX_TIME=300 \
GLUU_WAIT_SLEEP_DURATION=10
# ================
# Ldap Cleaner ENV
# ================
ENV PROCESS_TIMEOUT=300 \
TOTAL_RUN_TIME=300
# ==========
# misc stuff
# ==========
LABEL name="LDAPCacheCleaner" \
maintainer="Gluu Inc. <[email protected]>" \
vendor="Gluu Federation" \
version="4.1.1" \
release="01" \
summary="Gluu LDAPCacheCleaner" \
description="Clean cache entries in LDAP"
COPY scripts /app/scripts
RUN chmod +x /app/scripts/entrypoint.sh
ENTRYPOINT ["tini", "-g", "--"]
CMD ["sh", "/app/scripts/entrypoint.sh"]