version: '3.3'
services:
gameArchiving:
image: wlkc/cert-server
container_name: certManageServer
hostname: certManageServer
restart: always
ports:
- 8081:80
volumes:
- acmeRoot:/acme_root/:ro # acme.sh 证书目录
- serverConfig:/opt/server/configs # 用于配置白名单文件 whitelist.txt
- ./logs/:/var/log/
volumes:
serverConfig:
driver: local
driver_opts:
type: none
device: ./config/
o: bind
acmeRoot:
driver: local
driver_opts:
type: none
device: /root/.acme.sh
o: bind
获取证书信息:
curl http://xx.xx.xx/cert?domain=xxx.abc.com
curl http://xx.xx.xx/cert?domain=xxx.abc.com&down=1 #下载证书文件压缩包
响应结果:
{
"code": 0,
"msg": "success",
"data": [
{
"domain_names": [
"abc.com",
"*.abc.com"
],
"start_date": "2024-02-07",
"end_date": "2024-05-07",
"CN": "abc.com",
"cert_info": {
"fullchain": "-----BEGIN CERTIFICATE-----\n -----END CERTIFICATE-----\n",
"privateKey": "-----BEGIN EC PRIVATE KEY ---END EC PRIVATE KEY-----\n"
}
}
]
}
或者
{
"code": 404,
"msg": "未索引到相关证书信息"
}
Content type
Image
Digest
sha256:85063dc44…
Size
43.2 MB
Last updated
over 1 year ago
docker pull wlkc/cert-server