Various init scripts for bootstraping docker containers
Bootstrap a local DNS based on pihole/pihole
[...]
image: pihole/pihole
entrypoint: ''
command: /bin/bash -c "curl -fsSL [init-dns URL] | /bin/bash" # This needs to be bash for pihole
environment:
- INGRESS_DOMAIN: mydomain.local # Local domain used by ingress
- INGRESS_IP: 192.168.1.100 # Ingress IP address
[...]Bootstrap a PKI based on smallstep/step-ca
[...]
image: smallstep/step-ca
entrypoint: ''
command: /bin/sh -c "curl -fsSL [init-pki URL] | /bin/sh"
environment:
- NAME: MyCA # The name of the CA
- DNS: 'pki,pki.mydomain.local' # DNS names where the PKI will be reachable
- PROVISIONER: 'admin@mydomain.local' # Name of the first provisioner
volumes:
- /dev/urandom:/dev/urandom
- pki-step:/home/step
[...]Note
- Your ingress will need to trust the generated
root_ca.crtto obtain certificates with ACME. Fortraefikthis can be achieved by mounting thepki-stepvolume from the above example to/pkiand settingLEGO_CA_CERTIFICATESto/pki/certs/root_ca.crtThe ca-password is randomly generated in/home/step/secrets/password - An ACME provisioner is created by default (accessible at
https://[ca-url]/acme/acme/directory) - The config file is patched to enable the
badgerV2database withfileIOto prevent breaking on armv7 (See issue #279 in smallstep/certificates).