huanglingfa

生成免费证书

参考地址:https://github.com/acmesh-official/acme.sh/wiki/说明

在需要部署证书的网站机器上执行
curl  https://get.acme.sh | sh -s email=my@example.com
cd /root/.acme/
bash acme.sh  --issue  -d mydomain.com -d www.mydomain.com  --webroot  /home/wwwroot/mydomain.com/
第一个:-d是指主域名,
第二个:-d是指在域名控制台解析的子域名
--webroot  /home/wwwroot/mydomain.com/ 指的是网站根目录路径

颁发证书下来:
[root@idn-test-game .acme.sh]# ll repo.test.com/
total 36
-rw-r--r-- 1 root root 4399 Jan 20 15:33 ca.cer
-rw-r--r-- 1 root root 6700 Jan 20 15:33 fullchain.cer
-rw-r--r-- 1 root root 2301 Jan 20 15:33 repo.test.com.cer
-rw-r--r-- 1 root root  597 Jan 20 15:33 repo.test.com.conf
-rw-r--r-- 1 root root  972 Jan 20 15:32 repo.test.com.csr
-rw-r--r-- 1 root root  154 Jan 20 15:32 repo.test.com.csr.conf
-rw-r--r-- 1 root root 1679 Jan 20 15:32 repo.test.com.key

将域名证书部署到docker客户端中

repo.test.com.cer
mv repo.test.com.cer repo.test.com.crt

# 如果服务器多可以把域名证书放到一个web服务器中,可以提供下载,部署完成后只需登录操作即可
mkdir -p /etc/docker/certs.d/repo.test.com && 
cd /etc/docker/certs.d/repo.test.com && 
wget http://test.test.com/yunwei/test.test.com.crt &&
docker login -u user -p password repo.test.com

 

登录完成后测试下载镜像即可

docker push test.test.com/xxx/test:v-xxx

 

分类:

技术点:

相关文章:

  • 2021-11-17
  • 2022-12-23
  • 2022-01-02
  • 2021-06-23
  • 2022-12-23
  • 2021-12-07
  • 2022-01-02
  • 2021-06-08
猜你喜欢
  • 2022-12-23
  • 2021-11-06
  • 2022-01-01
  • 2022-01-04
  • 2022-12-23
  • 2022-01-08
  • 2021-12-18
相关资源
相似解决方案