Add entrypoint, variable support

This commit is contained in:
Nico Schottelius 2021-06-19 16:41:43 +02:00
parent b3d173b3fc
commit af8dceff70
3 changed files with 49 additions and 1 deletions

View File

@ -1,4 +1,7 @@
FROM alpine:3.13
FROM alpine:3.14
RUN apk update
RUN apk add certbot
CMD ["/"]

29 Normal file
View File

@ -0,0 +1,29 @@
## ungleich-certbot
This container is made for getting **real world** certificates
for your kubernetes cluster.
The assumption is that you can point the DNS name to the container
from outside. This is by default given for **IPv6 only kubernetes
## Usage
* Set the environment variable DOMAIN to specify the domain for which
to get a certificate
* Set the environment variable EMAIL (this is where letsencrypt sends
warnings to)
* Set the environment variable STAGING to "no" if you want to have
proper certificates - this is to prevent you from asking the real
letsencrypt service accidently by default
* ungleich-certbot gets your certificate
## Volumes
If you want to keep / use your certificates, you are advised to create
a volume below /etc/letsencrypt.
## Kubernetes
Sample kubernetes usage: (TBD)

16 Executable file
View File

@ -0,0 +1,16 @@
if [ -z "$DOMAIN" -o -z "$EMAIL" ]; then
echo Missing DOMAIN or EMAIL parameter - aborting. >&2
exit 1
if [ "$STAGING" = no ]; then
certbot certonly --agree-tos --cert-name "${DOMAIN}" \
--email "$EMAIL" --expand --non-interactive \
--domain "$DOMAIN" --standalone $STAGING