https://github.com/buzz/certbot
Dockerfile for Certbot
https://github.com/buzz/certbot
certbot docker dockerfile letsencrypt
Last synced: 10 months ago
JSON representation
Dockerfile for Certbot
- Host: GitHub
- URL: https://github.com/buzz/certbot
- Owner: buzz
- License: gpl-3.0
- Created: 2017-02-26T12:43:37.000Z (almost 9 years ago)
- Default Branch: main
- Last Pushed: 2024-11-20T17:38:49.000Z (about 1 year ago)
- Last Synced: 2025-03-24T23:26:43.325Z (10 months ago)
- Topics: certbot, docker, dockerfile, letsencrypt
- Language: Shell
- Size: 18.6 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Dockerfile for Certbot
======================
This is a Dockerfile for free and automatic [Let's Encrypt](https://letsencrypt.org/)
certificates.
* Is based on [Alpine Linux](https://alpinelinux.org).
* Uses [Certbot](https://github.com/certbot/certbot).
Once a day it renews certificates automatically if needed.
You can manually trigger certificate renewal:
```
$ docker-compose exec certbot certbot renew -q
```
Usage
-----
Use with `docker-compose.yml`:
```
services:
certbot:
container_name: certbot
build: github.com/buzz/certbot
restart: always
depends_on:
- nginx
volumes:
- ./volumes/www/acme-challenges:/var/www/acme-challenges
- ./volumes/etc/letsencrypt:/etc/letsencrypt
environment:
- DOMAINS
nginx:
container_name: nginx
image: nginx:alpine
restart: always
ports:
- 80:80
- 443:443
volumes:
- ./volumes/www:/var/www
- ./volumes/etc/nginx:/etc/nginx:ro
- ./volumes/etc/letsencrypt:/etc/letsencrypt:ro
```
and an `.env` file:
```
DOMAINS="
example.com
www.example.com
foo.example.com
"
```