-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (28 loc) · 1.34 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
#Use alpine as base
FROM nginx:alpine
MAINTAINER Adrien M [email protected]
#Recup la valeur used for multiarch building (can't have default value)
ARG TARGETARCH
#Push it into a ENV to have a default value
ENV TARGETARCH=${TARGETARCH:-amd64}
#Use also build arg
ARG VERSION_KUBE_GEN="artifacts/master"
ARG KAP_VERSION=master
ENV DEBUG=false KAP_DEBUG="0" KAP_VERSION=$KAP_VERSION
RUN apk add --no-cache nano ca-certificates unzip wget certbot bash openssl supervisor
# Install Kube-Gen-KAP
RUN wget "https://gitlab.com/adi90x/kube-template-kap/builds/$VERSION_KUBE_GEN/download?job=compile-go-$TARGETARCH" -O /tmp/kube-template-kap.zip \
&& unzip /tmp/kube-template-kap.zip -d /usr/local/bin \
&& chmod u+x /usr/local/bin/kube-template-kap \
&& rm -f /tmp/kube-template-kap.zip
#Copying all templates and script
COPY /app/ /app/
WORKDIR /app/
# Seting up repertories & Configure Nginx and apply fix for very long server names
RUN chmod +x /app/letsencrypt.sh \
&& mkdir -p /etc/nginx/certs /etc/nginx/vhost.d /etc/nginx/conf.d /usr/share/nginx/html /etc/letsencrypt \
&& echo "daemon off;" >> /etc/nginx/nginx.conf \
&& sed -i 's/^http {/&\n server_names_hash_bucket_size 128;/g' /etc/nginx/nginx.conf \
&& chmod u+x /app/remove
ENTRYPOINT ["/bin/bash", "/app/entrypoint.sh" ]
CMD ["supervisord", "-c", "/app/supervisord.conf"]