Skip to content

Commit

Permalink
Update documentation for v2.0.1 and Alpine builds
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasAlfredsson committed May 13, 2021
1 parent 95103a9 commit 0e2043a
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 25 deletions.
48 changes: 25 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# docker-nginx-certbot

Automatically create and renew website SSL certificates using the Let's Encrypt
free certificate authority and its client *certbot*. Built on top of the Nginx
server running on Debian. OpenSSL is used to automatically create the
Diffie-Hellman parameters used during the initial handshake of some ciphers.
Automatically create and renew website SSL certificates using the
[Let's Encrypt][1] free certificate authority and its client [*certbot*][2].
Built on top of the [official Nginx Docker images][9] (both Debian and Alpine),
and uses OpenSSL/LibreSSL to automatically create the Diffie-Hellman parameters
used during the initial handshake of some ciphers.

> :information_source: The very first time this container is started it might
take a long time before before it is ready to respond to requests. Read more
Expand All @@ -27,19 +28,14 @@ instructions, from `@staticfloat`'s image, can be found

Some of the more significant additions to this container:

- Handles multiple server names when
[requesting certificates][how-the-script-add-domain-names-to-certificate-requests]
(i.e. both `example.com` and `www.example.com`).
- Will create [Diffie-Hellman parameters][diffie-hellman-parameters] if they
are defined.
- Handles multiple server names when [requesting certificates][how-the-script-add-domain-names-to-certificate-requests] (i.e. both `example.com` and `www.example.com`).
- Will create [Diffie-Hellman parameters][diffie-hellman-parameters] if they are defined.
- Uses the [parent container][9]'s [`/docker-entrypoint.d/`][7] folder.
- Will report correct [exit code][6] when stopped/killed/failed.
- Stricter when it comes to checking that all files exist.
- You can do a live reload of configs by [sending in a `SIGHUP`][manualforce-renewal] signal (no container restart needed).
- Easy to [force renewal][manualforce-renewal] of certificates if necessary.
- You can do a live reload of configs by
[sending in a `SIGHUP`][manualforce-renewal] signal.
- You can tune your own [renewal interval][renewal-check-interval].
- Builds for multiple architectures available on [Docker Hub][8].
- Both [Debian and Alpine][dockerhub_tags] images built for [multiple architectures][14].



Expand Down Expand Up @@ -82,7 +78,7 @@ Some of the more significant additions to this container:
## Run with `docker run`
Create your own [`user_conf.d/`][the-user_conf.d-folder] folder and place all
of you custom server config files in there. When done you can just start the
container with the following command:
container with the following command ([available tags][dockerhub_tags]):

```bash
docker run -it -p 80:80 -p 443:443 \
Expand Down Expand Up @@ -124,14 +120,15 @@ docker-compose up

## Build It Yourself
This option is for if you make your own `Dockerfile`. Check out which tags that
are available on Docker Hub under [`jonasal/nginx-certbot`][8].
are available in [this document][dockerhub_tags], or on [Docker Hub][8], and
then choose how specific you want to be.

In this case it is possible to completely skip the
[`user_conf.d/`][the-user_conf.d-folder] folder, and write your files directly
into Nginx's `conf.d/` folder. This way you can replace the files I have built
[into the image](./src/nginx_conf.d) with your own. However, if you do that
please take a moment to understand what they do, and what you need to include
in order for certbot to continue working.
[`user_conf.d/`][the-user_conf.d-folder] folder and just write your files
directly into Nginx's `conf.d/` folder. This way you can replace the files I
have built [into the image](./src/nginx_conf.d) with your own. However, if you
do that please take a moment to understand what they do, and what you need to
include in order for certbot to continue working.

```Dockerfile
FROM jonasal/nginx-certbot:latest
Expand All @@ -141,13 +138,16 @@ COPY conf.d/* /etc/nginx/conf.d/


# More Resources
Here is a collection of links to other resources that provide useful
information.

### Good to Know
[Document][good-to-know] with a lot of good to know stuff about this image.
[Document][good-to-know] with a lot of good to know stuff about this image and
the features it provides.

### Changelog
[Document][changelog] with all the tagged versions of this repository, as well as
bullet points to what has changed between the releases.
[Document][changelog] with all the tagged versions of this repository, as well
as bullet points to what has changed between the releases.



Expand All @@ -163,6 +163,7 @@ bullet points to what has changed between the releases.
[initial-testing]: https://github.com/JonasAlfredsson/docker-nginx-certbot/tree/master/docs/good_to_know.md#initial-testing
[the-user_conf.d-folder]: https://github.com/JonasAlfredsson/docker-nginx-certbot/tree/master/docs/good_to_know.md#the-user_confd-folder
[changelog]: https://github.com/JonasAlfredsson/docker-nginx-certbot/tree/master/docs/changelog.md
[dockerhub_tags]: https://github.com/JonasAlfredsson/docker-nginx-certbot/blob/master/docs/dockerhub_tags.md

[1]: https://letsencrypt.org/
[2]: https://github.com/certbot/certbot
Expand All @@ -177,3 +178,4 @@ bullet points to what has changed between the releases.
[11]: https://docs.docker.com/engine/install/
[12]: https://www.duckdns.org/
[13]: https://portforward.com/router.htm
[14]: https://github.com/JonasAlfredsson/docker-nginx-certbot/issues/28
14 changes: 14 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

### 2.0.1
- There now exist a Dockerfile for building from the Nginx Alpine image as well.
- It is possible to use the Alpine version by appending `-alpine` to any
of the tags from now on.
- There are now so many tags available, see [dockerhub_tags.md][14] for the
possible combinations.
- NOTE: There exists a bug in Bash 5.1.0, which is described in detail [here].
- Small fix to the `create_dhparams.sh` script to handle the use of libressl
in Alpine.
- Added a small sleep in order to mitigate a rare race condition between Nginx
startup and the symlink script.
- Fix an ugly printout in the case when the sleep function exited naturally.

### 2.0.0
- Big change on how we recommend users to get their `.conf` files into the
container.
Expand Down Expand Up @@ -204,3 +217,4 @@
[12]: https://github.com/nginxinc/docker-nginx/commit/3fb70ddd7094c1fdd50cc83d432643dc10ab6243
[13]: https://github.com/JonasAlfredsson/docker-nginx-certbot/commit/bf2c1354f55adffadc13b1f1792e205f9dd25f86
[14]: https://github.com/JonasAlfredsson/docker-nginx-certbot/tree/master/docs/dockerhub_tags.md
[15]: https://github.com/JonasAlfredsson/bash_fail-to-wait
14 changes: 12 additions & 2 deletions docs/dockerhub_tags.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,22 @@ The `latest` tag will always build the head of the
[master branch][master-branch], so please use a more specific one if you can
since master should not be considered "stable".

The less specific tags will move as those more specific are updated.
All the tags since `2.0.0` are built for the following architectures:

- linux/amd64
- linux/386
- linux/arm64
- linux/arm/v7

and it is possible to append `-alpine` to any tag from `2.0.1` to get an Alpine
based image instead. The less specific tags will move as those more specific
are updated.


| Major | Minor | Patch | Nginx |
| ----: | ----: | ----: | :----------------- |
| 2 | 2.0 | 2.0.0 | 2.0.0-nginx1.19.10 |
| 2 | 2.0 | 2.0.1 | 2.0.1-nginx1.19.10 |
| | | 2.0.0 | 2.0.0-nginx1.19.10 |
| | | 1.3.0 | 1.3.0-nginx1.19.10 |
| | | | 1.3.0-nginx1.19.9 |
| | | 1.2.0 | 1.2.0-nginx1.19.9 |
Expand Down

0 comments on commit 0e2043a

Please sign in to comment.