From e7667fac3e67fad96601dc21347e7d0b27733f43 Mon Sep 17 00:00:00 2001 From: Su Yang Date: Mon, 2 Sep 2024 16:52:00 +0800 Subject: [PATCH] docs: update docs for 3.6.0 --- README.md | 28 +++++++++++++++++----------- README_CN.md | 29 +++++++++++++++++------------ docker-compose.yml | 2 +- 3 files changed, 35 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 500388a..17fbf5e 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,9 @@ Generate self-hosted or development certificates through simple configuration. Create self-signed certificates supporting `*.lab.com` and `*.data.lab.com` domains with just **"One Click"**: ```bash -docker run --rm -it -v `pwd`/ssl:/ssl soulteary/certs-maker:v3.5.0 "--CERT_DNS=lab.com,*.lab.com,*.data.lab.com" +docker run --rm -it -v `pwd`/ssl:/ssl soulteary/certs-maker:v3.6.0 "--CERT_DNS=lab.com,*.lab.com,*.data.lab.com" # OR use environment: -# docker run --rm -it -v `pwd`/ssl:/ssl -e "CERT_DNS=lab.com,*.lab.com,*.data.lab.com" soulteary/certs-maker:v3.5.0 +# docker run --rm -it -v `pwd`/ssl:/ssl -e "CERT_DNS=lab.com,*.lab.com,*.data.lab.com" soulteary/certs-maker:v3.6.0 ``` The generated certificates will be stored in the `ssl` directory within the execution directory: @@ -30,10 +30,14 @@ The generated certificates will be stored in the `ssl` directory within the exec ```bash ssl ├── lab.com.conf -├── lab.com.crt -└── lab.com.key +├── lab.com.der.crt +├── lab.com.der.key +├── lab.com.pem.crt +└── lab.com.pem.key ``` +You can use PEM or DER format certificates according to your preference. + For those who prefer file-based configuration, you can use a `docker-compose.yml` file like this: ```yaml @@ -41,7 +45,7 @@ version: '2' services: certs-maker: - image: soulteary/certs-maker:v3.5.0 + image: soulteary/certs-maker:v3.6.0 environment: - CERT_DNS=lab.com,*.lab.com,*.data.lab.com volumes: @@ -59,9 +63,9 @@ docker-compose up To make the certificate more Kubernetes-friendly, add the `FOR_K8S` parameter: ```bash -docker run --rm -it -v `pwd`/ssl:/ssl soulteary/certs-maker:v3.5.0 "--CERT_DNS=lab.com,*.lab.com,*.data.lab.com --FOR_K8S=ON" +docker run --rm -it -v `pwd`/ssl:/ssl soulteary/certs-maker:v3.6.0 "--CERT_DNS=lab.com,*.lab.com,*.data.lab.com --FOR_K8S=ON" # OR -# docker run --rm -it -v `pwd`/ssl:/ssl -e "CERT_DNS=lab.com,*.lab.com,*.data.lab.com" -e "FOR_K8S=ON" soulteary/certs-maker:v3.5.0 +# docker run --rm -it -v `pwd`/ssl:/ssl -e "CERT_DNS=lab.com,*.lab.com,*.data.lab.com" -e "FOR_K8S=ON" soulteary/certs-maker:v3.6.0 ``` Here's a K8s-friendly `docker-compose.yml` file: @@ -71,7 +75,7 @@ version: '2' services: certs-maker: - image: soulteary/certs-maker:v3.5.0 + image: soulteary/certs-maker:v3.6.0 environment: - CERT_DNS=lab.com,*.lab.com,*.data.lab.com - FOR_K8S=ON @@ -82,9 +86,9 @@ certs-maker: To enhance compatibility with Firefox, include the `FOR_FIREFOX` parameter: ```bash -docker run --rm -it -v `pwd`/ssl:/ssl soulteary/certs-maker:v3.5.0 "--CERT_DNS=lab.com,*.lab.com,*.data.lab.com --FOR_FIREFOX=ON" +docker run --rm -it -v `pwd`/ssl:/ssl soulteary/certs-maker:v3.6.0 "--CERT_DNS=lab.com,*.lab.com,*.data.lab.com --FOR_FIREFOX=ON" # OR -# docker run --rm -it -v `pwd`/ssl:/ssl -e "CERT_DNS=lab.com,*.lab.com,*.data.lab.com" -e "FOR_FIREFOX=ON" soulteary/certs-maker:v3.5.0 +# docker run --rm -it -v `pwd`/ssl:/ssl -e "CERT_DNS=lab.com,*.lab.com,*.data.lab.com" -e "FOR_FIREFOX=ON" soulteary/certs-maker:v3.6.0 ``` And here's a Firefox-friendly `docker-compose.yml` file: @@ -94,7 +98,7 @@ version: '2' services: certs-maker: - image: soulteary/certs-maker:v3.5.0 + image: soulteary/certs-maker:v3.6.0 environment: - CERT_DNS=lab.com,*.lab.com,*.data.lab.com - FOR_FIREFOX=ON @@ -124,6 +128,7 @@ Using environment variables: | File Owner User | USER | `USER=ubuntu` | | File Owner UID | UID | `UID=1234` | | File Owner GID | GID | `GID=2345` | +| Expire Days | EXPIRE_DAYS | `EXPIRE_DAYS=3650` | Using program CLI arguments: @@ -141,6 +146,7 @@ Using program CLI arguments: | File Owner User | USER | `--USER=ubuntu` | | File Owner UID | UID | `--UID=1234` | | File Owner GID | GID | `--GID=2345` | +| Expire Days | EXPIRE_DAYS | `--EXPIRE_DAYS=3650` | ## Docker Image diff --git a/README_CN.md b/README_CN.md index ac3a059..db1861e 100644 --- a/README_CN.md +++ b/README_CN.md @@ -16,9 +16,9 @@ 如果你本地已经安装好 Docker 或者 CTR,那么可以通过一条命令快速生成包含 `*.lab.com` 和 `*.data.lab.com` 的证书: ```bash -docker run --rm -it -v `pwd`/ssl:/ssl soulteary/certs-maker:v3.5.0 "--CERT_DNS=lab.com,*.lab.com,*.data.lab.com" +docker run --rm -it -v `pwd`/ssl:/ssl soulteary/certs-maker:v3.6.0 "--CERT_DNS=lab.com,*.lab.com,*.data.lab.com" # 如果你希望使用 ENV 来调整生成证书的参数 -# docker run --rm -it -v `pwd`/ssl:/ssl -e "CERT_DNS=lab.com,*.lab.com,*.data.lab.com" soulteary/certs-maker:v3.5.0 +# docker run --rm -it -v `pwd`/ssl:/ssl -e "CERT_DNS=lab.com,*.lab.com,*.data.lab.com" soulteary/certs-maker:v3.6.0 ``` 在命令执行完毕之后,我们检查执行命令的 `ssl` 就能看到生成的证书文件啦: @@ -26,10 +26,14 @@ docker run --rm -it -v `pwd`/ssl:/ssl soulteary/certs-maker:v3.5.0 "--CERT_DNS=l ```bash ssl ├── lab.com.conf -├── lab.com.crt -└── lab.com.key +├── lab.com.der.crt +├── lab.com.der.key +├── lab.com.pem.crt +└── lab.com.pem.key ``` +你可以根据自己的喜好,使用 PEM 或者 DER 格式的证书。 + 如果你更喜欢使用配置文件来生成证书,可以使用下面这个 `docker-compose.yml`: ```yaml @@ -37,7 +41,7 @@ version: '2' services: certs-maker: - image: soulteary/certs-maker:v3.5.0 + image: soulteary/certs-maker:v3.6.0 environment: - CERT_DNS=lab.com,*.lab.com,*.data.lab.com volumes: @@ -55,9 +59,9 @@ docker-compose up 如果你希望生成证书对 K8s 使用体验更友好,可以添加 `FOR_K8S` 参数: ```bash -docker run --rm -it -v `pwd`/ssl:/ssl soulteary/certs-maker:v3.5.0 "--CERT_DNS=lab.com,*.lab.com,*.data.lab.com --FOR_K8S=ON" +docker run --rm -it -v `pwd`/ssl:/ssl soulteary/certs-maker:v3.6.0 "--CERT_DNS=lab.com,*.lab.com,*.data.lab.com --FOR_K8S=ON" # 或 -# docker run --rm -it -v `pwd`/ssl:/ssl -e "CERT_DNS=lab.com,*.lab.com,*.data.lab.com" -e "FOR_K8S=ON" soulteary/certs-maker:v3.5.0 +# docker run --rm -it -v `pwd`/ssl:/ssl -e "CERT_DNS=lab.com,*.lab.com,*.data.lab.com" -e "FOR_K8S=ON" soulteary/certs-maker:v3.6.0 ``` 当然,这里也有使用 `FOR_K8S` 参数的 `compose` 配置文件: @@ -67,7 +71,7 @@ version: '2' services: certs-maker: - image: soulteary/certs-maker:v3.5.0 + image: soulteary/certs-maker:v3.6.0 environment: - CERT_DNS=lab.com,*.lab.com,*.data.lab.com - FOR_K8S=ON @@ -78,9 +82,9 @@ certs-maker: 如果你希望生成证书对 Firefox 的使用体验更友好,可以添加 `FOR_FIREFOX` 参数: ```bash -docker run --rm -it -v `pwd`/ssl:/ssl soulteary/certs-maker:v3.5.0 "--CERT_DNS=lab.com,*.lab.com,*.data.lab.com --FOR_FIREFOX=ON" +docker run --rm -it -v `pwd`/ssl:/ssl soulteary/certs-maker:v3.6.0 "--CERT_DNS=lab.com,*.lab.com,*.data.lab.com --FOR_FIREFOX=ON" # 或 -# docker run --rm -it -v `pwd`/ssl:/ssl -e "CERT_DNS=lab.com,*.lab.com,*.data.lab.com" -e "FOR_FIREFOX=ON" soulteary/certs-maker:v3.5.0 +# docker run --rm -it -v `pwd`/ssl:/ssl -e "CERT_DNS=lab.com,*.lab.com,*.data.lab.com" -e "FOR_FIREFOX=ON" soulteary/certs-maker:v3.6.0 ``` 当然,这里也有使用 `FOR_FIREFOX` 参数的 `compose` 配置文件: @@ -90,7 +94,7 @@ version: '2' services: certs-maker: - image: soulteary/certs-maker:v3.5.0 + image: soulteary/certs-maker:v3.6.0 environment: - CERT_DNS=lab.com,*.lab.com,*.data.lab.com - FOR_FIREFOX=ON @@ -120,7 +124,7 @@ certs-maker: | File Owner User | USER | `USER=ubuntu` | | File Owner UID | UID | `UID=1234` | | File Owner GID | GID | `GID=2345` | - +| Expire Days | EXPIRE_DAYS | `EXPIRE_DAYS=3650` | 使用命令行参数: @@ -138,6 +142,7 @@ certs-maker: | File Owner User | USER | `--USER=ubuntu` | | File Owner UID | UID | `--UID=1234` | | File Owner GID | GID | `--GID=2345` | +| Expire Days | EXPIRE_DAYS | `--EXPIRE_DAYS=3650` | ## Docker 镜像发布地址 diff --git a/docker-compose.yml b/docker-compose.yml index d801ab8..aa61eac 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "2" services: certs-maker: - image: soulteary/certs-maker:v3.5.0 + image: soulteary/certs-maker:v3.6.0 environment: - CERT_DNS=lab.com,*.lab.com,*.data.lab.com volumes: