forked from adi90x/rancher-active-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (23 loc) · 1.17 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
FROM nginx:alpine
MAINTAINER Adrien M [email protected]
ENV DEBUG=false RAP_DEBUG="info"
ARG VERSION_RANCHER_GEN="artifacts/master"
RUN apk add --no-cache nano ca-certificates unzip wget certbot bash openssl
# Install Forego & Rancher-Gen-RAP
ADD https://github.com/jwilder/forego/releases/download/v0.16.1/forego /usr/local/bin/forego
RUN wget "https://gitlab.com/adi90x/rancher-gen-rap/builds/$VERSION_RANCHER_GEN/download?job=compile-go" -O /tmp/rancher-gen-rap.zip \
&& unzip /tmp/rancher-gen-rap.zip -d /usr/local/bin \
&& chmod +x /usr/local/bin/rancher-gen \
&& chmod u+x /usr/local/bin/forego \
&& rm -f /tmp/rancher-gen-rap.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 ["forego", "start", "-r"]