{"id":15141754,"url":"https://github.com/rea1shane/lego-docker-helper","last_synced_at":"2025-08-21T14:32:35.609Z","repository":{"id":255606681,"uuid":"851547246","full_name":"rea1shane/lego-docker-helper","owner":"rea1shane","description":"Make Lego deploy certificates in Docker easier","archived":true,"fork":false,"pushed_at":"2025-02-07T09:23:12.000Z","size":44,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T15:46:41.370Z","etag":null,"topics":["acme","acme-client","certificate","docker","docker-compose","docker-image","dockerfile","go","lego","letsencrypt","shell","tls"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/rea1shane/lego-docker-helper","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rea1shane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-03T09:44:19.000Z","updated_at":"2025-02-20T08:19:16.000Z","dependencies_parsed_at":"2024-09-10T11:54:59.576Z","dependency_job_id":"7b2fe794-4f81-40fd-af25-a86e8624d222","html_url":"https://github.com/rea1shane/lego-docker-helper","commit_stats":null,"previous_names":["rea1shane/lego-docker-helper"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rea1shane/lego-docker-helper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rea1shane%2Flego-docker-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rea1shane%2Flego-docker-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rea1shane%2Flego-docker-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rea1shane%2Flego-docker-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rea1shane","download_url":"https://codeload.github.com/rea1shane/lego-docker-helper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rea1shane%2Flego-docker-helper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271495536,"owners_count":24769610,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["acme","acme-client","certificate","docker","docker-compose","docker-image","dockerfile","go","lego","letsencrypt","shell","tls"],"created_at":"2024-09-26T09:01:43.105Z","updated_at":"2025-08-21T14:32:35.323Z","avatar_url":"https://github.com/rea1shane.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Lego](https://github.com/go-acme/lego) Docker helper\n\nUse Docker label to determine which certificates should be deployed to which containers and deploy them via the Docker client.\n\nNo changes were made other than installing `docker-cli` and [`helper.sh`](https://github.com/rea1shane/lego-docker-helper/blob/main/helper.sh) on the original image. See [Dockerfile](https://github.com/rea1shane/lego-docker-helper/blob/main/Dockerfile).\n\nFeatures:\n\n- Use `crond` as daemon.\n- Provide some useful functions ([demo](https://github.com/rea1shane/lego-docker-helper/tree/main/demo)):\n  - `docker_copy_by_label`: Copy certificates to containers with specified Docker label.\n  - `docker_exec_by_label`: Execute command in containers with specified Docker label.\n  - `docker_restart_by_label`: Restart containers with specified Docker label.\n\n## Usage\n\nFirst, adding labels to containers where certificates need to be deployed, like [this](https://github.com/rea1shane/lego-docker-helper/blob/main/demo/docker-compose.yaml#L14). Then down and up containers to make labels take effect.\n\nSecond, make your own hook script, like [this](https://github.com/rea1shane/lego-docker-helper/blob/main/hook.sh.example).\n\nThen, up `lego-docker-helper` container and mount `docker.sock` in it with `rw` permission, like [this](https://github.com/rea1shane/lego-docker-helper/blob/main/demo/docker-compose.yaml#L8). Also don't forget to mount your hook script into the container.\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e By default, container use UTC. To set cron expressions by local time, specify your time zone with the environment variable `TZ` when start the container, like [this](https://github.com/rea1shane/lego-docker-helper/blob/main/demo/docker-compose.yaml#L6). See [list with all the timezones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List).\n\nFinally, do anything else as you did before with Lego.\n\n\u003e [!TIP]\n\u003e\n\u003e Edit cron jobs via `crontab -e` to ensure that `crond` can be reloaded.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frea1shane%2Flego-docker-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frea1shane%2Flego-docker-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frea1shane%2Flego-docker-helper/lists"}