最近需要SSL证书,又不想花钱买,正好看到linux基金会去年底上线了新的开源项目,免费推广SSL遂尝试。

Let's Encrypt 介绍

Let’s Encrypt is a free, automated, and open certificate authority (CA), run for the public’s benefit. It is a service provided by the Internet Security Research Group (ISRG).

We give people the digital certificates they need in order to enable HTTPS (SSL/TLS) for websites, for free, in the most user-friendly way we can. We do this because we want to create a more secure and privacy-respecting Web.

The key principles behind Let’s Encrypt are:

Free: Anyone who owns a domain name can use Let’s Encrypt to obtain a trusted certificate at zero cost.
Automatic: Software running on a web server can interact with Let’s Encrypt to painlessly obtain a certificate, securely configure it for use, and automatically take care of renewal.
Secure: Let’s Encrypt will serve as a platform for advancing TLS security best practices, both on the CA side and by helping site operators properly secure their servers.
Transparent: All certificates issued or revoked will be publicly recorded and available for anyone to inspect.
Open: The automatic issuance and renewal protocol will be published as an open standard that others can adopt.
Cooperative: Much like the underlying Internet protocols themselves, Let’s Encrypt is a joint effort to benefit the community, beyond the control of any one organization.
We have a page with more detailed information about how the Let’s Encrypt CA works.

以下内容来源于dockhub上的xataz/letsencrypt,有修改

1.编辑Dockerfile如下(部分内容来源于网络:xazta)

FROM alpine:3.5

ENV CERTBOT_VER v0.11.1

LABEL description="Letsencrypt based on alpine" \
tags="latest 0.11.1 0.1" \
maintainer="shawn.qian" \
build_ver="2017022401"

RUN BUILD_DEPS="py2-pip \
gcc \
musl-dev \
python2-dev \
libffi-dev \
openssl-dev" \
&& apk add -U ${BUILD_DEPS} \
tini \
dialog \
python \
libssl1.0 \
&& pip install --no-cache virtualenv \
&& virtualenv --no-site-packages -p python2 /usr/certbot/venv \
&& /usr/certbot/venv/bin/pip install --no-cache-dir certbot==$CERTBOT_VER \
&& pip uninstall --no-cache-dir -y virtualenv \
&& apk del ${BUILD_DEPS} \
&& rm -rf /var/cache/apk/* /root/.cache/pip

EXPOSE 80 443
VOLUME /etc/letsencrypt/

ENTRYPOINT ["/sbin/tini","--","/usr/certbot/venv/bin/certbot"]
CMD ["--help"]

保存文件,运行

docker build -t yourreposname/letsencrypt

安静等待build完成

2. 执行

sudo docker run -it --rm \

-v /etc/letsencrypt:/etc/letsencrypt \

-p 443:443 yourreposname/letsencrypt certonly \

--standalone \

--agree-tos

\-m yourmailadd@mail.com

\-d your.domain.com

P.S

1.本案例使用443端口,请保持你的443端口畅通,成功后会在/etc/letsencrypt下生成live/your.domain.com文件夹,里面就是你的证书文件了。

2. yourreposname/letsencrypt 其中"yourreposname"改成你的仓库名

cert.pem 申请的服务器证书文件

privkey.pem 服务器证书对应的私钥

chain.pem 除服务器证书外,浏览器解析所需的其他全部证书,比如根证书和中间证书

fullchain.pem 包含服务器证书的全部证书链文件

Letsencrypt SSL免费证书申请(Docker)的更多相关文章

  1. SSL免费证书申请以及nginx配置https流程记录

    设置https需要ssl 证书,可以通过FreeSSL[https://freessl.org/]申请. 流程记录: 输入域名,如 http://www.youdias.xin 选择品牌,如Let's ...

  2. HTTPS(SSL / TLS)免费证书申请及网站证书部署实战总结

    服务器环境:windows server 2008  +  tomcat7 废话不多说,先看部署效果: 一.免费证书申请 Let's Encrypt  简介:let's Encrypt 是一个免费的开 ...

  3. 转自《https安全链接的配置教程:startSSl免费证书申请与nginx的https支持配置》

    一.什么是 SSL 证书,什么是 HTTPS 网站? SSL证书是数字证书的一种,类似于驾驶证.护照和营业执照的电子副本.SSL证书通过在客户端浏览器和Web服务器之间建立一条SSL安全通道(Secu ...

  4. Nginx启用ssl以及免费证书申请

    主要是这个东西,折腾了我两天,所以记录下来. 最开始是在meteor下面调用一个webservice,但是发现meteor项目的发布环境时https,所以请求的webservice也必须时webser ...

  5. 免费证书申请——Let's Encrypt的申请与应用(IIS,Tomcat)

    环境 Windows Server 2008 R2 Tomcat 8.5.31 JDK8 利用IIS+letsencrypt-win-simple.V1.9.1申请免费SSL证书 新建一个IIS空网站 ...

  6. iOS https认证 && SSL/TLS证书申请

    1.下面列出截止2016年底市面上常见的免费CA证书: 腾讯云SSL证书管理(赛门铁克TrustAsia DV SSL证书)阿里云云盾证书服务(赛门铁克DV SSL证书)百度云SSL证书服务Let's ...

  7. Java Web学习总结(31)——全站HTTPS化SSL免费证书使用

    1 背景 谷歌从 2017 年起,Chrome 浏览器将也会把采用 HTTP 协议的网站标记为「不安全」网站:苹果从 2017 年 iOS App 将强制使用 HTTPS:在国内热火朝天的小程序也要求 ...

  8. 阿里云使用ssl免费证书

    购买免费证书 购买之后 申请证书 该域名必须添加一条TXT记录 根据提示添加记录 下载证书 我用的nginx做的映射,所以下载nginx nginx安装自行百度 将下载的文件解压到nginx目录下(创 ...

  9. StartSSL免费证书申请笔记

    第一步:申请startssl账号 填写相应信息后,你所填写的邮箱会收到邮件 里面有一个用来验证的验证码 输入得到的.... 注册成功后会安装数字证书(注意:注册过程中没有叫输入账号密码,这也是通过证认 ...

随机推荐

  1. springboot整合mybatis遇到无法扫描MaperScan包的问题

    1.启动类加上@MaperScan注解后,一直报错如下: Error creating bean with name 'platUserMapper' defined in file [D:\work ...

  2. Python第一个GUI

    #!/usr/bin/python#coding=utf-8'''Created on 2017年11月2日 from home @author: James zhan ''' from functo ...

  3. C# 用 WebClient 的 Post 方法向 WebServer 传输数据

    帮朋友做一个通过Web简单传输数据的例子,百度了一下抄了段代码,完成,效果如下: 其中textBox1里面是客户端需要传输过去的数据,textBox2里面是接收到的返回数据. 代码如下: using ...

  4. 防止asp马后门

    好多朋友都拿的有webshell吧,基本上都加了密的...  可是,没见到源码,很难测试它到底有没有后门, 指不定给别人打工了...  下面贴种很简单的方法,大家别扔蛋哈 (asp的哦)  在代码的最 ...

  5. MySQL 用户连接与用户线程

    本文转载自公众号数据库随笔,作者happypig 微信看起来麻烦 pig已经好长一段时间没有分享文章了,有点对不起订阅的朋友.最近在做比较复杂跟困难的事情,也并不一定最终会有成果,因此必须对此沉默. ...

  6. 事务理解及Spring中的事务

    一.隔离级别理解 1.脏读 首先理解,一个事务对数据进行了改变,尽管该事务尚未提交,但此时其他事务中的查询语句(注意一定是处于事务中的语句,不处于事务中的语句查到的是正常的)查到的数据,是该事务修改之 ...

  7. 基于FPGA的1553B通信模块的设计(转)

    reference:http://www.21ic.com/app/eda/201808/798483.htm https://www.milstd1553.com/ [导读] 摘 要: 提出一种将F ...

  8. hadoop Non DFS Used是什么

    首先我们先来了解一下Non DFS User是什么? Non DFS User的意思是:非hadoop文件系统所使用的空间,比如说本身的linux系统使用的,或者存放的其它文件   它的计算公式: n ...

  9. python IDE PyCharm的安装

    首先去Pycharm官网,或者直接输入网址:http://www.jetbrains.com/pycharm/download  : 选择Windows系统 免费版本下载: 双击下载的安装包,进行安装 ...

  10. python接口自动化测试(一)-request模块

    urllib.request模块是python3针对处理url的. 1. 首先导入: from urllib import request 2. 构造url,构造url的headers信息和传参[re ...