mkcert

dcagatay/mkcert Docker Image

dcagatay/mkcert是将mkcert工具容器化的镜像,可用于生成自有的可信根CA证书以及指定域名的SSL证书,方便开发环境快速配置本地HTTPS服务。

1 次收藏下载次数: 0状态:社区镜像维护者:dcagatay仓库类型:镜像最近更新:
下载命令
点击查看

docker-mkcert

https://github.com/FiloSottile/mkcert is a great tool for creating your own trusted Certificate Authority and certificates for any domain. Why not use mkcert in container?

Usage

Basic Usage

The container can be run with docker run command and create a new Root CA certificate and a single certificate for our domain list.

sh
docker run --rm -it -v "$PWD/certs:/certs" dcagatay/mkcert example.com www.example.com '*.example.com'

Note: The single quotes around '*.example.com' are necessary to prevent the shell from prematurely expanding the wildcard character.

If the domain list is not given, only Root CA certificate will be created.

sh
docker run --rm -it -v "$PWD/certs:/certs" dcagatay/mkcert

If a Root CA certificate exists /certs/ca directory (/certs/ca/rootCA.pem and /certs/ca/rootCA-key.pem, the certificate will be created using that Root CA certificate.

Advanced Usage

The owner of the created certificates is root user by default. If you want to change the ownership of the certificates you can provide PUID and PGID environment variables to the command.

sh
docker run --rm -it -e "PUID=$(id -u)" -e "PGID=$(id -g)" -v "$PWD/certs:/certs" dcagatay/mkcert example.com www.example.com '*.example.com'

Building Image Locally

sh
docker buildx build -t dcagatay/mkcert:latest .

Changelog

  • In the version v1.4.4;
    • The root certificate directory was moved to /certs/ca from /certs, If you were using a previous version you need to move your rootCA.pem and rootCA-key.pem files under /certs/ca.
    • The user id and group id variables, UID and GID, are renamed to PUID and PUID.

Credits

  • https://github.com/FiloSottile/mkcert
  • Inspired by https://github.com/vishnudxb/docker-mkcert

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 mkcert 镜像标签

docker pull docker.xuanyuan.run/dcagatay/mkcert:<标签>

DockerHub 原生拉取命令

docker pull dcagatay/mkcert:<标签>
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载在线技术支持专业版保障服务可用付费会员免广告