mirror of
https://github.com/vxcontrol/rancher-letsencrypt.git
synced 2026-07-01 00:08:01 -04:00
Adds support for Rancher servers that use self-signed certificates
This commit is contained in:
-13
@@ -1,13 +0,0 @@
|
||||
FROM alpine:3.4
|
||||
|
||||
RUN apk add --no-cache ca-certificates
|
||||
|
||||
ENV LETSENCRYPT_RELEASE v0.4.0
|
||||
|
||||
ADD https://github.com/janeczku/rancher-letsencrypt/releases/download/${LETSENCRYPT_RELEASE}/rancher-letsencrypt-linux-amd64.tar.gz /tmp/rancher-letsencrypt.tar.gz
|
||||
|
||||
RUN tar -zxvf /tmp/rancher-letsencrypt.tar.gz -C /usr/bin \
|
||||
&& chmod +x /usr/bin/rancher-letsencrypt
|
||||
|
||||
ENTRYPOINT ["/usr/bin/rancher-letsencrypt"]
|
||||
EXPOSE 80
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
FROM alpine:3.4
|
||||
FROM alpine:3.5
|
||||
|
||||
RUN apk add --no-cache ca-certificates
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
FROM alpine:3.5
|
||||
|
||||
RUN apk add --no-cache ca-certificates openssl bash
|
||||
|
||||
ENV LETSENCRYPT_RELEASE v0.4.0
|
||||
ENV SSL_SCRIPT_COMMIT 08278ace626ada71384fc949bd637f4c15b03b53
|
||||
|
||||
RUN wget -O /usr/bin/update-rancher-ssl https://raw.githubusercontent.com/rancher/rancher/${SSL_SCRIPT_COMMIT}/server/bin/update-rancher-ssl && \
|
||||
chmod +x /usr/bin/update-rancher-ssl
|
||||
|
||||
COPY rancher-entrypoint.sh /usr/bin/
|
||||
|
||||
ADD https://github.com/janeczku/rancher-letsencrypt/releases/download/${LETSENCRYPT_RELEASE}/rancher-letsencrypt-linux-amd64.tar.gz /tmp/rancher-letsencrypt.tar.gz
|
||||
|
||||
RUN tar -zxvf /tmp/rancher-letsencrypt.tar.gz -C /usr/bin \
|
||||
&& chmod +x /usr/bin/rancher-letsencrypt
|
||||
|
||||
EXPOSE 80
|
||||
ENTRYPOINT ["/usr/bin/rancher-entrypoint.sh"]
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
# first arg is `-flag` or `--some-flag`
|
||||
if [ "${1:0:1}" = '-' ]; then
|
||||
set -- /usr/bin/rancher-letsencrypt "$@"
|
||||
fi
|
||||
|
||||
# no argument
|
||||
if [ -z "$1" ]; then
|
||||
set -- /usr/bin/rancher-letsencrypt
|
||||
fi
|
||||
|
||||
/usr/bin/update-rancher-ssl
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user