Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
soulteary committed Aug 4, 2024
1 parent fa22ab1 commit 5497547
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
35 changes: 20 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@

<img src="logo.png">

**Tiny self-signed tool, file size between 1.5MB and 4MB.**
**Lightweight self-signed certificate generator, size between 1.5MB (executable) and 5MB (docker image).**

Generate a self-hosted / dev certificate through configuration.
Generate self-hosted or development certificates through simple configuration.

<img src=".github/assets.jpg">
<img src=".github/dockerhub.jpg">

## Quick Start

Generate self-signed certificate supporting `*.lab.com` and `*.data.lab.com`, just "One Click":
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"
# 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
```

Check in the `ssl` directory of the execution command directory:
The generated certificates will be stored in the `ssl` directory within the execution directory:

```bash
ssl
Expand All @@ -34,7 +34,7 @@ ssl
└── lab.com.key
```

If you prefer to use file configuration, you can use `docker-compose.yml` like this:
For those who prefer file-based configuration, you can use a `docker-compose.yml` file like this:

```yaml
version: '2'
Expand All @@ -48,23 +48,23 @@ certs-maker:
- ./ssl:/ssl
```
Then execute the following command:
Then, run the following command:
```bash
docker-compose up
# OR
# docker compose up
```

If you want the certificate to be more friendly to K8s, you can add the `FOR_K8S` parameter:
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"
# 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
```

And K8S friendly compose file:
Here's a K8s-friendly `docker-compose.yml` file:

```yaml
version: '2'
Expand All @@ -79,15 +79,15 @@ certs-maker:
- ./ssl:/ssl
```
If you want the certificate to be more friendly to Firefox, you can add the `FOR_FIREFOX` parameter:
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"
# 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
```

And Firefox friendly compose file:
And here's a Firefox-friendly `docker-compose.yml` file:

```yaml
version: '2'
Expand All @@ -102,13 +102,13 @@ certs-maker:
- ./ssl:/ssl
```
If you want to further define the information content of the certificate, including the issuing country, province, street, organization name, etc., you can refer to the following document to manually add parameters.
For more granular control over certificate details, such as issuing country, province, street, and organization name, refer to the following section on manually adding parameters.
## SSL certificate parameters
## SSL Certificate Parameters
You can customize the generated certificate by declaring the environment variables or cli args of docker.
Customize your generated certificate by setting environment variables or using Docker CLI arguments.
Use in environment variables:
Using environment variables:
| Parameter | Name | Use in environment variables |
| ------ | ------ | ------ |
Expand All @@ -125,7 +125,7 @@ Use in environment variables:
| File Owner UID | UID | `UID=1234` |
| File Owner GID | GID | `GID=2345` |

Use in Program CLI arguments:
Using program CLI arguments:

| Parameter | Name | Use in CLI arguments |
| ------ | ------ | ------ |
Expand All @@ -145,3 +145,8 @@ Use in Program CLI arguments:
## Docker Image

[soulteary/certs-maker](https://hub.docker.com/r/soulteary/certs-maker)

## Related Documentation and Tutorials

- [Creating a Lightweight 3MB Docker Image for Self-Signed Certificates: Introducing Certs Maker](https://soulteary.com/2022/10/22/make-docker-tools-image-with-only-3md-self-signed-certificate-certs-maker.html)
- [A Comprehensive Guide to Creating and Implementing Self-Signed Certificates](https://soulteary.com/2021/02/06/how-to-make-and-use-a-self-signed-certificate.html)
2 changes: 1 addition & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<img src="logo.png">

一个小巧的 SSL 证书生成工具(Docker 工具镜像),静态文件尺寸 1.5MB 左右,容器镜像尺寸 4MB 左右。
一个小巧的 SSL 证书生成工具(Docker 工具镜像),静态文件尺寸 1.5MB 左右,容器镜像尺寸 5MB 左右。

你可以使用它快速生成需要的自签名证书,用于生产或开发场景。

Expand Down

0 comments on commit 5497547

Please sign in to comment.