certbotコマンドをインストールするには?

ショコラ
ショコラ

certbotコマンドをインストールするには?

certbotパッケージでキメマス。
certbotコマンドはリバースプロキシの nginxコンテナにインストールするようにしています。

もっさん先輩
もっさん先輩
apt-get install -y --no-install-recommends certbot

–-no-install-recommends
 オプション有り → 37.7 MB
 オプション無し → 61.9 MB

手順

nginxコンテナに certbotパッケージをインストールする手順。

  1. nginxコンテナを起動します。
docker run -it nxinx bash
  1. apt-get アップデートします。
apt-get update
  1. certbotパッケージをインストールします。
apt-get install -y --no-install-recommends certbot

以上

因みに↓こちらのコマンドで証明書を取得できます。

certbot certonly -d {ホスト名} -m {メールアドレス}
# certbot certonly -d answorz.com -m mossan@answorz.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log

How would you like to authenticate with the ACME CA?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: Spin up a temporary webserver (standalone)
2: Place files in webroot directory (webroot)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel):
Scroll to Top