All Projects → humenius → Traefik Certs Dumper

humenius / Traefik Certs Dumper

Licence: apache-2.0
Dumps Let's Encrypt certificates of a specified domain which Traefik stores in acme.json.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Traefik Certs Dumper

Rules docker
Rules for building and handling Docker images with Bazel
Stars: ✭ 744 (+3620%)
Mutual labels:  docker-image
Jekyll Docker
⛴ Docker images, and CI builders for Jekyll.
Stars: ✭ 804 (+3920%)
Mutual labels:  docker-image
Docker Dante Telegram
dante config builder for Telegram SOCKS-proxy & Dockerfile for building image with such proxy
Stars: ✭ 16 (-20%)
Mutual labels:  docker-image
Flannel
flannel is a network fabric for containers, designed for Kubernetes
Stars: ✭ 6,905 (+34425%)
Mutual labels:  docker-image
Androidsdk
🐳 Full-fledged Android SDK Docker Image
Stars: ✭ 776 (+3780%)
Mutual labels:  docker-image
Metasfresh
We do Open Source ERP - Fast, Flexible & Free Software to scale your Business.
Stars: ✭ 807 (+3935%)
Mutual labels:  docker-image
Vrnetlab
Run virtual routers with docker
Stars: ✭ 731 (+3555%)
Mutual labels:  docker-image
Docker Lambda Packager
A docker image based on Amazon Linux to create packages for AWS Lambda 🐳 🐜
Stars: ✭ 18 (-10%)
Mutual labels:  docker-image
Serverless Domain Manager
Serverless plugin for managing custom domains with API Gateways.
Stars: ✭ 783 (+3815%)
Mutual labels:  certificate
Bludit
Simple, Fast, Secure, Flat-File CMS
Stars: ✭ 824 (+4020%)
Mutual labels:  docker-image
Docker Node
Official Docker Image for Node.js 🐳 🐢 🚀
Stars: ✭ 6,873 (+34265%)
Mutual labels:  docker-image
Scratch Node
Distroless Node.js Docker Images
Stars: ✭ 778 (+3790%)
Mutual labels:  docker-image
Azurite
A lightweight server clone of Azure Storage that simulates most of the commands supported by it with minimal dependencies
Stars: ✭ 810 (+3950%)
Mutual labels:  docker-image
Docker Bind
Dockerize BIND DNS server with webmin for DNS administration
Stars: ✭ 769 (+3745%)
Mutual labels:  docker-image
Docker Sonarqube
🐳 SonarQube in Docker
Stars: ✭ 894 (+4370%)
Mutual labels:  docker-image
Dca Prep Guide
Docker Certification Associate preparation guide - a list of resources to help you prepare for a successful certification
Stars: ✭ 739 (+3595%)
Mutual labels:  certificate
Aria2 Pro Docker
Aria2 Pro | A perfect Aria2 Docker image | 更好用的 Aria2 Docker 容器镜像
Stars: ✭ 802 (+3910%)
Mutual labels:  docker-image
Docker Jenkins
Jenkins with Blue Ocean and support for builiding jobs in Docker
Stars: ✭ 18 (-10%)
Mutual labels:  docker-image
Mpsec
One Stop MPTCP Service : MPSec
Stars: ✭ 18 (-10%)
Mutual labels:  docker-image
Docker Postgis
Docker image for PostGIS
Stars: ✭ 821 (+4005%)
Mutual labels:  docker-image

traefik-certs-dumper

Docker Pulls Docker Image Version (latest semver) MicroBadger Size (tag) MicroBadger Size (tag) GitHub Workflow Status GitHub Workflow Status (Alpine)

Dumps Let's Encrypt certificates of a specified domain to .pem and .key files which Traefik stores in acme.json.

This image uses:

Special thanks to them!

IMPORTANT: It's supposed to work with Traefik v2 or higher! If you want to use this certificate dumper with v1, you can simply change the image to mailu/traefik-certdumper.

Usage

Image choice

We ship various flavors of this image - multi-arch, Docker (default) and Alpine. The versioning follows SemVer.

amd64 (normal) arm32v7 arm64v8
Docker (normal) latest, x.x.x, x.x, x arm32v7, x.x.x-arm32v7, x.x-arm32v7, x-arm32v7 arm64v8,x.x.x-arm64v8, x.x-arm64v8, x-arm64v8
Alpine alpine, x.x.x-alpine, x.x-alpine, x-alpine arm32v7-alpine, x.x.x-arm32v7-alpine, x.x-arm32v7-alpine, x-arm32v7-alpine arm64v8-alpine,x.x.x-arm64v8-alpine, x.x-arm64v8-alpine, x-arm64v8-alpine

alpine notes!

Please note that when using the alpine variant, using the container restart functionality won't work due to missing Docker installation and will be skipped.

Basic setup

Mount your ACME folder into /traefik and output folder to /output. Here's an example for docker-compose:

version: '3.7'

services:
  certdumper:
    image: humenius/traefik-certs-dumper:latest
    container_name: traefik_certdumper
    volumes:
    - ./traefik/acme:/traefik:ro
    - ./output:/output:rw
    environment:
    - DOMAIN=example.org

Automatic container restart

If you want to have containers restarted after dumping certificates into your output folder, you can specify their names as comma-separated value and pass them through via optional parameter -r | --restart-containers. In this case, you must pass the Docker socket (or override $DOCKER_HOST if you use a Docker socket proxy). For instance:

version: '3.7'

services:
  certdumper:
    image: humenius/traefik-certs-dumper:latest
    container_name: traefik_certdumper
    command: --restart-containers container1,container2,container3
    volumes:
    - ./traefik/acme:/traefik:ro
    - ./output:/output:rw
    - /var/run/docker.sock:/var/run/docker.sock:ro
    environment:
    - DOMAIN=example.org

It is also possible to restart Docker services. You can specify their names exactly like the containers via the optional parameter --restart-services. The services are updated with the command docker service update --force <service_name> which restarts all tasks in the service.

Change ownership of certificate and key files

If you want to change the onwership of the certificate and key files because your container runs on different permissions than root, you can specify the UID and GID as an environment variable. These environment variables are OVERRIDE_UID and OVERRIDE_GID. These can only be integers and must both be set for the override to work. For instance:

version: '3.7'

services:
  certdumper:
    image: humenius/traefik-certs-dumper:latest
    container_name: traefik_certdumper
    command: --restart-containers container1,container2,container3
    volumes:
    - ./traefik/acme:/traefik:ro
    - ./output:/output:rw
    - /var/run/docker.sock:/var/run/docker.sock:ro
    environment:
    - DOMAIN=example.org
    - OVERRIDE_UID=1000
    - OVERRIDE_GID=1000

Extract multiple domains

This Docker image is able to extract multiple domains as well. Use environment variable DOMAIN and add you domains as a comma-separated list. After certificate dumping, the certificates can be found in the domains' subdirectories respectively. (/output/DOMAIN[i]/...) If you specify a single domain, the output folder remains the same as in previous versions (< v1.3 - /output).

version: '3.7'

services:
  certdumper:
    image: humenius/traefik-certs-dumper:latest
    container_name: traefik_certdumper
    volumes:
    - ./traefik/acme:/traefik:ro
    - ./output:/output:rw
    - /var/run/docker.sock:/var/run/docker.sock:ro
    environment:
      DOMAIN: example.com,example.org,example.net,hello.example.in

Health Check

This Docker image does reports its health status. The process which monitors run.sh reports back 1 when it malfunctions and 0 when it is running inside Docker container. Normally, it's embedded in the Dockerfile which means without further ado, this works out of the box. However, if you want to specify more than one health check, you can set them via docker-compose.

version: '3.7'

services:
  certdumper:
    image: humenius/traefik-certs-dumper:latest
    container_name: traefik_certdumper
    volumes:
    - ./traefik/acme:/traefik:ro
    - ./output:/output:rw
    - /var/run/docker.sock:/var/run/docker.sock:ro
    environment:
      DOMAIN: example.com,example.org,example.net,sub.domain.ext
    healthcheck:
      test: ["CMD", "/usr/bin/healthcheck"]
      interval: 30s
      timeout: 10s
      retries: 5

Help!

If you need help using this image, have suggestions or want to report a problem, feel free to open an issue on GitHub!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].