From bcffaab602bc426d8a425effa0c0c2a57400c294 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Mon, 3 Jun 2019 15:59:05 -0700 Subject: [PATCH 01/36] add LICENSE.txt --- tools/docker/LICENSE.txt | 190 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 190 insertions(+) create mode 100644 tools/docker/LICENSE.txt diff --git a/tools/docker/LICENSE.txt b/tools/docker/LICENSE.txt new file mode 100644 index 000000000..9c14e2b17 --- /dev/null +++ b/tools/docker/LICENSE.txt @@ -0,0 +1,190 @@ + Copyright 2019 Electronic Frontier Foundation and others + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS From 1d1c096067136a31220b2434e8279a3c7cb15ed5 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Mon, 3 Jun 2019 16:04:45 -0700 Subject: [PATCH 02/36] add readme --- tools/docker/README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 tools/docker/README.md diff --git a/tools/docker/README.md b/tools/docker/README.md new file mode 100644 index 000000000..42b47286d --- /dev/null +++ b/tools/docker/README.md @@ -0,0 +1 @@ +Coming soon: The repository for the [official Certbot images on Docker Hub](https://hub.docker.com/u/certbot) From 62b054f265a8ba637a4f7b56b75208adc119ca7e Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Thu, 18 Jul 2019 15:45:27 +0200 Subject: [PATCH 03/36] Create the deployment logic (#1) * Integrate original adferrand/certbot-docker * Make build.sh more symetric for readability * Update README.md Co-Authored-By: Joona Hoikkala * Update README.md Co-Authored-By: Joona Hoikkala * Add post_push hooks to update the latest tag * Create error on build * Revert "Create error on build" This reverts commit d578d67130d3a0c4db7756209b0ade52953041a3. * Update deploy.sh * Fix deploy.sh with hotfixes versions * Fix deploy.sh toward certbot version and release branch * Enable push --- tools/docker/README.md | 61 +++++++++++++++++++++++- tools/docker/build.sh | 72 +++++++++++++++++++++++++++++ tools/docker/core/Dockerfile | 45 ++++++++++++++++++ tools/docker/core/README.md | 26 +++++++++++ tools/docker/core/hooks/build | 5 ++ tools/docker/core/hooks/post_push | 5 ++ tools/docker/deploy.sh | 35 ++++++++++++++ tools/docker/plugin/Dockerfile | 12 +++++ tools/docker/plugin/README.md | 13 ++++++ tools/docker/plugin/hooks/build | 5 ++ tools/docker/plugin/hooks/post_push | 5 ++ tools/docker/plugin/hooks/pre_build | 5 ++ 12 files changed, 288 insertions(+), 1 deletion(-) create mode 100755 tools/docker/build.sh create mode 100644 tools/docker/core/Dockerfile create mode 100644 tools/docker/core/README.md create mode 100644 tools/docker/core/hooks/build create mode 100644 tools/docker/core/hooks/post_push create mode 100644 tools/docker/deploy.sh create mode 100644 tools/docker/plugin/Dockerfile create mode 100644 tools/docker/plugin/README.md create mode 100644 tools/docker/plugin/hooks/build create mode 100644 tools/docker/plugin/hooks/post_push create mode 100644 tools/docker/plugin/hooks/pre_build diff --git a/tools/docker/README.md b/tools/docker/README.md index 42b47286d..e346218da 100644 --- a/tools/docker/README.md +++ b/tools/docker/README.md @@ -1 +1,60 @@ -Coming soon: The repository for the [official Certbot images on Docker Hub](https://hub.docker.com/u/certbot) +Certbot-Docker project +====================== + +Goal +---- + +This project is used to publish on DockerHub a new version of the official Certbot Docker, and related Certbot DNS plugins Dockers, upon release of a new version of Certbot. +It leverages the AutoBuild features of DockerHub to coordinate this publication through a continous integration/deployment approach. + +High-level behavior +------------------- + +When a new version tag (eg. v0.35.0) is pushed to this repository, it triggers a new build in each DockerHub project, to construct and publish the new version of the Docker, +containing the Certbot version corresponding to the pushed tag. With the example of the v0.35.0, the DockerHub projects will contain after few minutes a new tag v0.35.0, +whose the Docker contains Certbot v0.35.0. + +Configuration +------------- + +To setup the publication process, the target DockerHub project must be configured appropriately. There are two types of DockerHub projects to take into account: +* the Docker project for Certbot core features (eg. certbot/certbot) +* a Docker project for Certbot DNS plugins (eg. certbot/dns-rfc2136) + +1) Define a GitHub user with push rights to the current GIT repository. +2) Create the DockerHub project if necessary. +3) Activate the AutoBuild feature, using the current GIT repository as source (eg. https.//github.com/certbot/certbot-docker.git) and the user defined in 1). +4) Define a unique tag build rule in AutoBuild configuration: + + _For a Certbot core Docker_ -> Source: `/^(v[0-9.]+).*$/`, Tag: `{\1}`, Dockerfile: `Dockerfile`, Build context: `/core` + + _For a Certbot DNS plugin Docker_ -> Source: `/^(v[0-9.]+).*$/`, Tag: `{\1}`, Dockerfile: `Dockerfile`, Build context: `/plugin` + +Publication worfklow +-------------------- + +Assuming the version to publish is `v0.35.0` + +1) Clone this repository locally, checkout branch `master` and ensure to have a clean workspace. +2) (Optional) Execute `./build.sh v0.35.0` to test the Dockers builds. +3) Execute `./deploy.sh v0.35.0` to trigger the publication of all Dockers with `v0.35.0` version. + +Scripts usage +------------- + +``` +./build.sh [VERSION] +``` + +This script will build locally all Dockers for the given version using the same runtime than DockerHub. +This can be used to test the build process before invoking the actual publication workflow. + +``` +./deploy [VERSION] +``` + +This script will trigger the publication on DockerHub of all Dockers for the given version. To do so, this script: +- update the relevant `README.md` files that will be used as description in the DockerHub repositories, +- commit locally the modifications, +- tag this commit with the given version, +- push this tag and the updated `master` branch. diff --git a/tools/docker/build.sh b/tools/docker/build.sh new file mode 100755 index 000000000..bd1b8ec19 --- /dev/null +++ b/tools/docker/build.sh @@ -0,0 +1,72 @@ +#!/bin/bash +set -euo pipefail +IFS=$'\n\t' + +# This script builds certbot docker and certbot dns plugins docker against a given release version of certbot. +# The build is done following the environment used by Dockerhub to handle its autobuild feature, and so can be +# used as a pre-deployment validation test. + +# Usage: ./build.sh [VERSION] +# with [VERSION] corresponding to a released version of certbot, like `v0.34.0` + +trap Cleanup 1 2 3 6 + +Cleanup() { + if [ ! -z "$WORK_DIR" ]; then + rm -rf "$WORK_DIR/plugin/certbot" || true + rm -rf "$WORK_DIR/core/certbot" || true + fi + popd 2> /dev/null || true +} + +WORK_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + +DOCKER_TAG="$1" +SOURCE_BRANCH="$DOCKER_TAG" + +Cleanup + +# Step 1: Certbot core Docker + +DOCKER_REPO="certbot/certbot" +CONTEXT_PATH="$WORK_DIR/core" +DOCKERFILE_PATH="$CONTEXT_PATH/Dockerfile" +IMAGE_NAME="$DOCKER_REPO:$DOCKER_TAG" + +pushd "$CONTEXT_PATH" + DOCKER_TAG="$DOCKER_TAG" DOCKER_REPO="$DOCKER_REPO" DOCKERFILE_PATH="$DOCKERFILE_PATH" IMAGE_NAME="$IMAGE_NAME" bash hooks/build +popd + +Cleanup + +# Step 2: Certbot dns plugins Dockers + +CERTBOT_PLUGINS_DOCKER_REPOS=( + "certbot/dns-dnsmadeeasy" + "certbot/dns-dnsimple" + "certbot/dns-ovh" + "certbot/dns-cloudflare" + "certbot/dns-cloudxns" + "certbot/dns-digitalocean" + "certbot/dns-google" + "certbot/dns-luadns" + "certbot/dns-nsone" + "certbot/dns-rfc2136" + "certbot/dns-route53" + "certbot/dns-gehirn" + "certbot/dns-linode" + "certbot/dns-sakuracloud" +) + +for DOCKER_REPO in ${CERTBOT_PLUGINS_DOCKER_REPOS[@]}; do + CONTEXT_PATH="$WORK_DIR/plugin" + DOCKERFILE_PATH="$CONTEXT_PATH/Dockerfile" + IMAGE_NAME="$DOCKER_REPO:$DOCKER_TAG" + + pushd "$CONTEXT_PATH" + DOCKER_TAG="$DOCKER_TAG" DOCKER_REPO="$DOCKER_REPO" DOCKERFILE_PATH="$DOCKERFILE_PATH" IMAGE_NAME="$IMAGE_NAME" bash hooks/pre_build + DOCKER_TAG="$DOCKER_TAG" DOCKER_REPO="$DOCKER_REPO" DOCKERFILE_PATH="$DOCKERFILE_PATH" IMAGE_NAME="$IMAGE_NAME" bash hooks/build + popd + + Cleanup +done diff --git a/tools/docker/core/Dockerfile b/tools/docker/core/Dockerfile new file mode 100644 index 000000000..044202bda --- /dev/null +++ b/tools/docker/core/Dockerfile @@ -0,0 +1,45 @@ +FROM python:2-alpine3.9 + +ARG CERTBOT_VERSION +ENV CERTBOT_VERSION=${CERTBOT_VERSION} + +ENTRYPOINT [ "certbot" ] +EXPOSE 80 443 +VOLUME /etc/letsencrypt /var/lib/letsencrypt +WORKDIR /opt/certbot + +# Retrieve certbot code +RUN mkdir -p src \ + && wget -O certbot-${CERTBOT_VERSION}.tar.gz https://github.com/certbot/certbot/archive/v${CERTBOT_VERSION}.tar.gz \ + && tar xf certbot-${CERTBOT_VERSION}.tar.gz \ + && cp certbot-${CERTBOT_VERSION}/CHANGELOG.md certbot-${CERTBOT_VERSION}/README.rst certbot-${CERTBOT_VERSION}/setup.py src/ \ + && cp certbot-${CERTBOT_VERSION}/letsencrypt-auto-source/pieces/dependency-requirements.txt . \ + && cp -r certbot-${CERTBOT_VERSION}/tools tools \ + && cp -r certbot-${CERTBOT_VERSION}/acme src/acme \ + && cp -r certbot-${CERTBOT_VERSION}/certbot src/certbot \ + && rm -rf certbot-${CERTBOT_VERSION}.tar.gz certbot-${CERTBOT_VERSION} + +# Generate constraints file to pin dependency versions +RUN cat dependency-requirements.txt | tools/strip_hashes.py > unhashed_requirements.txt \ + && cat tools/dev_constraints.txt unhashed_requirements.txt | tools/merge_requirements.py > docker_constraints.txt + +# Install certbot runtime dependencies +RUN apk add --no-cache --virtual .certbot-deps \ + libffi \ + libssl1.1 \ + openssl \ + ca-certificates \ + binutils + +# Install certbot from sources +RUN apk add --no-cache --virtual .build-deps \ + gcc \ + linux-headers \ + openssl-dev \ + musl-dev \ + libffi-dev \ + && pip install -r dependency-requirements.txt \ + && pip install --no-cache-dir --no-deps \ + --editable src/acme \ + --editable src \ +&& apk del .build-deps diff --git a/tools/docker/core/README.md b/tools/docker/core/README.md new file mode 100644 index 000000000..6c7312951 --- /dev/null +++ b/tools/docker/core/README.md @@ -0,0 +1,26 @@ +# ![](https://certbot.eff.org/images/certbot-logo-1A.svg) +[![](https://img.shields.io/badge/current-v0.34.1-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.34.x)](https://travis-ci.com/certbot/certbot) + +This is the Docker repository for Certbot Core. + +## Certbot DNS plugins + +* [dns-dnsmadeeasy](https://hub.docker.com/r/certbot/dns-dnsmadeeasy) +* [dns-dnsimple](https://hub.docker.com/r/certbot/dns-dnsimple) +* [dns-ovh](https://hub.docker.com/r/certbot/dns-ovh) +* [dns-cloudflare](https://hub.docker.com/r/certbot/dns-cloudflare) +* [dns-cloudxns](https://hub.docker.com/r/certbot/dns-cloudxns) +* [dns-digitalocean](https://hub.docker.com/r/certbot/dns-digitalocean) +* [dns-google](https://hub.docker.com/r/certbot/dns-google) +* [dns-luadns](https://hub.docker.com/r/certbot/dns-luadns) +* [dns-nsone](https://hub.docker.com/r/certbot/dns-nsone) +* [dns-rfc2136](https://hub.docker.com/r/certbot/dns-rfc2136) +* [dns-route53](https://hub.docker.com/r/certbot/dns-route53) +* [dns-gehirn](https://hub.docker.com/r/certbot/dns-gehirn) +* [dns-linode](https://hub.docker.com/r/certbot/dns-linode) +* [dns-sakuracloud](https://hub.docker.com/r/certbot/dns-sakuracloud) + +## Sources: + +* [docker](https://www.github.com/certbot/certbot-docker.git) +* [certbot](https://www.github.com/certbot/certbot.git) diff --git a/tools/docker/core/hooks/build b/tools/docker/core/hooks/build new file mode 100644 index 000000000..e0e4d6571 --- /dev/null +++ b/tools/docker/core/hooks/build @@ -0,0 +1,5 @@ +#!/bin/bash +set -ex + +CERTBOT_VERSION=${DOCKER_TAG//v/} +docker build --build-arg CERTBOT_VERSION=${CERTBOT_VERSION} -f ${DOCKERFILE_PATH} -t ${IMAGE_NAME} . diff --git a/tools/docker/core/hooks/post_push b/tools/docker/core/hooks/post_push new file mode 100644 index 000000000..6b8459521 --- /dev/null +++ b/tools/docker/core/hooks/post_push @@ -0,0 +1,5 @@ +#!/bin/bash +set -ex + +docker tag ${IMAGE_NAME} "${DOCKER_REPO}:latest" +docker push "${DOCKER_REPO}:latest" diff --git a/tools/docker/deploy.sh b/tools/docker/deploy.sh new file mode 100644 index 000000000..e6960f67d --- /dev/null +++ b/tools/docker/deploy.sh @@ -0,0 +1,35 @@ +#!/bin/bash +set -euo pipefail +IFS=$'\n\t' + +# This script deploys a new version of certbot dockers (core+plugins) regarding a released version of Certbot. +# The README.md is updated to include the reference of this new version, and a tag version is pushed to the +# Certbot Docker repository, triggering the DockerHub autobuild feature that will take care of the release. + +# Usage: ./deploy.sh [VERSION] +# with [VERSION] corresponding to a released version of certbot, like `v0.34.0` + +trap Cleanup 1 2 3 6 + +Cleanup() { + popd 2> /dev/null || true +} + +WORK_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + +CERTBOT_DOCKER_VERSION="$1" # Eg. v0.35.0 or v0.35.0-1 +CERTBOT_VERSION=$(sed -E -e 's|(v[0-9+]\.[0-9]+\.[0-9]+).*|\1|g' <<< $CERTBOT_DOCKER_VERSION) # Eg. v0.35.0 +BRANCH_NAME=$(sed -E -e 's|v(.*)\.[0-9]+|\1.x|g' <<< $CERTBOT_VERSION) # Eg. 0.35.x + +sed -i -e "s|current-.*-blue\.svg|current-$CERTBOT_VERSION-blue.svg|g" core/README.md +sed -i -e "s|branch=.*)\]|branch=$BRANCH_NAME)]|g" core/README.md + +sed -i -e "s|current-.*-blue\.svg|current-$CERTBOT_VERSION-blue.svg|g" plugin/README.md +sed -i -e "s|branch=.*)\]|branch=$BRANCH_NAME)]|g" plugin/README.md + +pushd "$WORK_DIR" + git commit -a -m "Release version $CERTBOT_DOCKER_VERSION" --allow-empty + git tag "$CERTBOT_DOCKER_VERSION" + git push + git push --tags +popd diff --git a/tools/docker/plugin/Dockerfile b/tools/docker/plugin/Dockerfile new file mode 100644 index 000000000..f249a64e6 --- /dev/null +++ b/tools/docker/plugin/Dockerfile @@ -0,0 +1,12 @@ +FROM certbot/certbot + +ARG PLUGIN_NAME + +# Retrieve Certbot DNS plugin code +RUN wget -O certbot-${CERTBOT_VERSION}.tar.gz https://github.com/certbot/certbot/archive/v${CERTBOT_VERSION}.tar.gz \ + && tar xf certbot-${CERTBOT_VERSION}.tar.gz \ + && cp -r certbot-${CERTBOT_VERSION}/certbot-${PLUGIN_NAME} /opt/certbot/src/certbot-${PLUGIN_NAME} \ + && rm -rf certbot-${CERTBOT_VERSION}.tar.gz certbot-${CERTBOT_VERSION} + +# Install the DNS plugin +RUN pip install --constraint /opt/certbot/docker_constraints.txt --no-cache-dir --editable /opt/certbot/src/certbot-${PLUGIN_NAME} diff --git a/tools/docker/plugin/README.md b/tools/docker/plugin/README.md new file mode 100644 index 000000000..362f4a029 --- /dev/null +++ b/tools/docker/plugin/README.md @@ -0,0 +1,13 @@ +# ![](https://certbot.eff.org/images/certbot-logo-1A.svg) +[![](https://img.shields.io/badge/current-v0.34.1-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.34.x)](https://travis-ci.com/certbot/certbot) + +This is one of the Docker repository for the Certbot DNS plugins. + +## Certbot Core + +* [certbot](https://hub.docker.com/r/certbot/certbot) + +## Sources: + +* [docker](https://www.github.com/certbot/certbot-docker.git) +* [certbot](https://www.github.com/certbot/certbot.git) diff --git a/tools/docker/plugin/hooks/build b/tools/docker/plugin/hooks/build new file mode 100644 index 000000000..435b1d42b --- /dev/null +++ b/tools/docker/plugin/hooks/build @@ -0,0 +1,5 @@ +#!/bin/bash +set -ex + +PLUGIN_NAME=${DOCKER_REPO//*\//} +docker build --build-arg PLUGIN_NAME=${PLUGIN_NAME} -f ${DOCKERFILE_PATH} -t ${IMAGE_NAME} . diff --git a/tools/docker/plugin/hooks/post_push b/tools/docker/plugin/hooks/post_push new file mode 100644 index 000000000..6b8459521 --- /dev/null +++ b/tools/docker/plugin/hooks/post_push @@ -0,0 +1,5 @@ +#!/bin/bash +set -ex + +docker tag ${IMAGE_NAME} "${DOCKER_REPO}:latest" +docker push "${DOCKER_REPO}:latest" diff --git a/tools/docker/plugin/hooks/pre_build b/tools/docker/plugin/hooks/pre_build new file mode 100644 index 000000000..22c582758 --- /dev/null +++ b/tools/docker/plugin/hooks/pre_build @@ -0,0 +1,5 @@ +#!/bin/bash +set -ex + +CERTBOT_VERSION=${DOCKER_TAG//v/} +docker build --build-arg CERTBOT_VERSION=${CERTBOT_VERSION} -f ../core/Dockerfile -t certbot/certbot ../core From d8ab321894f1cae8dfe470b977b31f37d508226d Mon Sep 17 00:00:00 2001 From: J0WI Date: Tue, 23 Jul 2019 02:07:14 +0200 Subject: [PATCH 04/36] Upgrade to Alpine 3.10 (#2) certbot/certbot#7250 --- tools/docker/core/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/docker/core/Dockerfile b/tools/docker/core/Dockerfile index 044202bda..6942ca489 100644 --- a/tools/docker/core/Dockerfile +++ b/tools/docker/core/Dockerfile @@ -1,4 +1,4 @@ -FROM python:2-alpine3.9 +FROM python:2-alpine3.10 ARG CERTBOT_VERSION ENV CERTBOT_VERSION=${CERTBOT_VERSION} From 2fc6f6e619dee6b67b8614f0483c68edf6b335b3 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 23 Jul 2019 01:32:43 -0700 Subject: [PATCH 05/36] Make deploy.sh executable. (#3) --- tools/docker/deploy.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 tools/docker/deploy.sh diff --git a/tools/docker/deploy.sh b/tools/docker/deploy.sh old mode 100644 new mode 100755 From d0d75212155096d227f43e02be15046f7e0e31fa Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Wed, 24 Jul 2019 15:48:45 -0700 Subject: [PATCH 06/36] Release version v0.36.0 --- tools/docker/core/README.md | 2 +- tools/docker/plugin/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/docker/core/README.md b/tools/docker/core/README.md index 6c7312951..142df64c3 100644 --- a/tools/docker/core/README.md +++ b/tools/docker/core/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v0.34.1-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.34.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v0.36.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.36.x)](https://travis-ci.com/certbot/certbot) This is the Docker repository for Certbot Core. diff --git a/tools/docker/plugin/README.md b/tools/docker/plugin/README.md index 362f4a029..7ca5adcd6 100644 --- a/tools/docker/plugin/README.md +++ b/tools/docker/plugin/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v0.34.1-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.34.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v0.36.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.36.x)](https://travis-ci.com/certbot/certbot) This is one of the Docker repository for the Certbot DNS plugins. From db522aa15585a466c5d1de1cb475dae5fa2d5ada Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Wed, 7 Aug 2019 11:46:22 -0700 Subject: [PATCH 07/36] Release version v0.37.0 --- tools/docker/core/README.md | 2 +- tools/docker/plugin/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/docker/core/README.md b/tools/docker/core/README.md index 142df64c3..6d490c95b 100644 --- a/tools/docker/core/README.md +++ b/tools/docker/core/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v0.36.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.36.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v0.37.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.37.x)](https://travis-ci.com/certbot/certbot) This is the Docker repository for Certbot Core. diff --git a/tools/docker/plugin/README.md b/tools/docker/plugin/README.md index 7ca5adcd6..9edc09ca3 100644 --- a/tools/docker/plugin/README.md +++ b/tools/docker/plugin/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v0.36.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.36.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v0.37.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.37.x)](https://travis-ci.com/certbot/certbot) This is one of the Docker repository for the Certbot DNS plugins. From 1666e8511899e6a93b0e16755519e490200b34a1 Mon Sep 17 00:00:00 2001 From: Erica Portnoy Date: Thu, 8 Aug 2019 17:58:41 -0700 Subject: [PATCH 08/36] Release version v0.37.1 --- tools/docker/core/README.md | 2 +- tools/docker/plugin/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/docker/core/README.md b/tools/docker/core/README.md index 6d490c95b..3a3a842c8 100644 --- a/tools/docker/core/README.md +++ b/tools/docker/core/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v0.37.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.37.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v0.37.1-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.37.x)](https://travis-ci.com/certbot/certbot) This is the Docker repository for Certbot Core. diff --git a/tools/docker/plugin/README.md b/tools/docker/plugin/README.md index 9edc09ca3..eafaa4a7a 100644 --- a/tools/docker/plugin/README.md +++ b/tools/docker/plugin/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v0.37.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.37.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v0.37.1-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.37.x)](https://travis-ci.com/certbot/certbot) This is one of the Docker repository for the Certbot DNS plugins. From f64386c73c3d2a93a5600875f2570dfc85c06b31 Mon Sep 17 00:00:00 2001 From: Erica Portnoy Date: Wed, 21 Aug 2019 16:13:06 -0700 Subject: [PATCH 09/36] Release version v0.37.2 --- tools/docker/core/README.md | 2 +- tools/docker/plugin/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/docker/core/README.md b/tools/docker/core/README.md index 3a3a842c8..7f7706aa4 100644 --- a/tools/docker/core/README.md +++ b/tools/docker/core/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v0.37.1-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.37.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v0.37.2-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.37.x)](https://travis-ci.com/certbot/certbot) This is the Docker repository for Certbot Core. diff --git a/tools/docker/plugin/README.md b/tools/docker/plugin/README.md index eafaa4a7a..95da99a14 100644 --- a/tools/docker/plugin/README.md +++ b/tools/docker/plugin/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v0.37.1-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.37.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v0.37.2-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.37.x)](https://travis-ci.com/certbot/certbot) This is one of the Docker repository for the Certbot DNS plugins. From d296ef2dcdd979c4df5c9e19ae7845ea6f462258 Mon Sep 17 00:00:00 2001 From: J0WI Date: Wed, 28 Aug 2019 21:43:58 +0200 Subject: [PATCH 10/36] Update to Python 3.7 (#5) certbot/certbot#6759 closes #4 --- tools/docker/core/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/docker/core/Dockerfile b/tools/docker/core/Dockerfile index 6942ca489..2b0ca2b0c 100644 --- a/tools/docker/core/Dockerfile +++ b/tools/docker/core/Dockerfile @@ -1,4 +1,4 @@ -FROM python:2-alpine3.10 +FROM python:3.7-alpine3.10 ARG CERTBOT_VERSION ENV CERTBOT_VERSION=${CERTBOT_VERSION} From 7337f641808f5650464e780831d5ce30b940a1ce Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 3 Sep 2019 14:15:44 -0700 Subject: [PATCH 11/36] Release version v0.38.0 --- tools/docker/core/README.md | 2 +- tools/docker/plugin/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/docker/core/README.md b/tools/docker/core/README.md index 7f7706aa4..49c2a89d2 100644 --- a/tools/docker/core/README.md +++ b/tools/docker/core/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v0.37.2-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.37.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v0.38.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.38.x)](https://travis-ci.com/certbot/certbot) This is the Docker repository for Certbot Core. diff --git a/tools/docker/plugin/README.md b/tools/docker/plugin/README.md index 95da99a14..10cafccdb 100644 --- a/tools/docker/plugin/README.md +++ b/tools/docker/plugin/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v0.37.2-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.37.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v0.38.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.38.x)](https://travis-ci.com/certbot/certbot) This is one of the Docker repository for the Certbot DNS plugins. From 67fddae90d9723774fc0bc893b3f616a02cf68fd Mon Sep 17 00:00:00 2001 From: Erica Portnoy Date: Tue, 1 Oct 2019 13:30:11 -0700 Subject: [PATCH 12/36] Release version v0.39.0 --- tools/docker/core/README.md | 2 +- tools/docker/plugin/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/docker/core/README.md b/tools/docker/core/README.md index 49c2a89d2..fe2d807e0 100644 --- a/tools/docker/core/README.md +++ b/tools/docker/core/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v0.38.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.38.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v0.39.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.39.x)](https://travis-ci.com/certbot/certbot) This is the Docker repository for Certbot Core. diff --git a/tools/docker/plugin/README.md b/tools/docker/plugin/README.md index 10cafccdb..c2b6f2869 100644 --- a/tools/docker/plugin/README.md +++ b/tools/docker/plugin/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v0.38.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.38.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v0.39.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.39.x)](https://travis-ci.com/certbot/certbot) This is one of the Docker repository for the Certbot DNS plugins. From e9a9a180bb1f39209158472d1014c3cf0d76dbf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oriol=20Teixid=C3=B3?= Date: Fri, 11 Oct 2019 17:07:45 +0200 Subject: [PATCH 13/36] Multiarch (#3) * Add one Dockerfile for each supported architecture * Update multi arch hooks * Create multi arch scripts * Update README.md * WIP. Use build args instead of multiple Dockerfiles in build script * WIP. Fix typo mistake * Use build args instead of multiple Dockerfiles in build script * WIP. Build all the architectures in one DockerHub build * Add arm64v8 architecture * WIP. Testing build all the architectures in one DockerHub build * Revert "WIP. Testing build all the architectures in one DockerHub build" This reverts commit 94a89398a4120b183d2851ac7cb9c93db0e3d187. * Refactor tag docker images in hooks/post_push files * Use variables instead of positional arguments * Export externally used variables * Use ${variable//search/replace} instead of echo $variable | sed. * Update README.md * Add Cleanup in build.sh script * Fix tagging error in post_push hook * Add "-ex" flags to bash script * Test tagging images in build hook * Tagging in hook/post_build instead of hook/post_push * Push built architecture dependent image * Use Dockerfile argument instead of fixed value * Fix typo * Use parameter instead of global variable * Use custom "hook/push" to prevent duplicated push * Make a short doctype for each function declared in common --- tools/docker/README.md | 13 ++- tools/docker/build.sh | 49 ++++------ tools/docker/core/.gitignore | 1 + tools/docker/core/Dockerfile | 9 +- tools/docker/core/hooks/build | 10 +- tools/docker/core/hooks/post_push | 11 ++- tools/docker/core/hooks/pre_build | 10 ++ tools/docker/core/hooks/push | 11 +++ tools/docker/deploy.sh | 12 +-- tools/docker/lib/common | 142 ++++++++++++++++++++++++++++ tools/docker/plugin/.gitignore | 1 + tools/docker/plugin/Dockerfile | 12 ++- tools/docker/plugin/hooks/build | 9 +- tools/docker/plugin/hooks/post_push | 11 ++- tools/docker/plugin/hooks/pre_build | 9 +- tools/docker/plugin/hooks/push | 11 +++ 16 files changed, 273 insertions(+), 48 deletions(-) create mode 100644 tools/docker/core/.gitignore create mode 100755 tools/docker/core/hooks/pre_build create mode 100644 tools/docker/core/hooks/push create mode 100644 tools/docker/lib/common create mode 100644 tools/docker/plugin/.gitignore create mode 100644 tools/docker/plugin/hooks/push diff --git a/tools/docker/README.md b/tools/docker/README.md index e346218da..966c6be74 100644 --- a/tools/docker/README.md +++ b/tools/docker/README.md @@ -12,7 +12,7 @@ High-level behavior When a new version tag (eg. v0.35.0) is pushed to this repository, it triggers a new build in each DockerHub project, to construct and publish the new version of the Docker, containing the Certbot version corresponding to the pushed tag. With the example of the v0.35.0, the DockerHub projects will contain after few minutes a new tag v0.35.0, -whose the Docker contains Certbot v0.35.0. +whose the Docker contains Certbot v0.35.0. Configuration ------------- @@ -58,3 +58,14 @@ This script will trigger the publication on DockerHub of all Dockers for the giv - commit locally the modifications, - tag this commit with the given version, - push this tag and the updated `master` branch. + +Assuming the version to publish is `v0.35.0`, the following docker images will be created at DockerHub. + +- certbot/certbot:v0.35.0 *(amd64 architecture)* +- certbot/certbot:amd64-v0.35.0 +- certbot/certbot:arm32v6-v0.35.0 +- certbot/certbot:arm64v8-v0.35.0 +- certbot/certbot:latest *(amd64 architecture)* +- certbot/certbot:amd64-latest +- certbot/certbot:arm32v6-latest +- certbot/certbot:arm64v8-latest diff --git a/tools/docker/build.sh b/tools/docker/build.sh index bd1b8ec19..765aa79c5 100755 --- a/tools/docker/build.sh +++ b/tools/docker/build.sh @@ -13,34 +13,32 @@ trap Cleanup 1 2 3 6 Cleanup() { if [ ! -z "$WORK_DIR" ]; then - rm -rf "$WORK_DIR/plugin/certbot" || true - rm -rf "$WORK_DIR/core/certbot" || true + rm -rf "$WORK_DIR"/core/qemu-*-static || true + rm -rf "$WORK_DIR"/plugin/qemu-*-static || true fi popd 2> /dev/null || true } +Build() { + DOCKER_REPO="$1" + CERTBOT_VERSION="$2" + CONTEXT_PATH="$3" + DOCKERFILE_PATH="$CONTEXT_PATH/Dockerfile" + DOCKER_TAG="$CERTBOT_VERSION" + pushd "$CONTEXT_PATH" + DOCKER_TAG="$DOCKER_TAG" DOCKER_REPO="$DOCKER_REPO" DOCKERFILE_PATH="$DOCKERFILE_PATH" bash hooks/pre_build + DOCKER_TAG="$DOCKER_TAG" DOCKER_REPO="$DOCKER_REPO" DOCKERFILE_PATH="$DOCKERFILE_PATH" bash hooks/build + popd +} + WORK_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" -DOCKER_TAG="$1" -SOURCE_BRANCH="$DOCKER_TAG" - -Cleanup +CERTBOT_VERSION="$1" # Step 1: Certbot core Docker - -DOCKER_REPO="certbot/certbot" -CONTEXT_PATH="$WORK_DIR/core" -DOCKERFILE_PATH="$CONTEXT_PATH/Dockerfile" -IMAGE_NAME="$DOCKER_REPO:$DOCKER_TAG" - -pushd "$CONTEXT_PATH" - DOCKER_TAG="$DOCKER_TAG" DOCKER_REPO="$DOCKER_REPO" DOCKERFILE_PATH="$DOCKERFILE_PATH" IMAGE_NAME="$IMAGE_NAME" bash hooks/build -popd - -Cleanup +Build "certbot/certbot" "$CERTBOT_VERSION" "$WORK_DIR/core" # Step 2: Certbot dns plugins Dockers - CERTBOT_PLUGINS_DOCKER_REPOS=( "certbot/dns-dnsmadeeasy" "certbot/dns-dnsimple" @@ -58,15 +56,8 @@ CERTBOT_PLUGINS_DOCKER_REPOS=( "certbot/dns-sakuracloud" ) -for DOCKER_REPO in ${CERTBOT_PLUGINS_DOCKER_REPOS[@]}; do - CONTEXT_PATH="$WORK_DIR/plugin" - DOCKERFILE_PATH="$CONTEXT_PATH/Dockerfile" - IMAGE_NAME="$DOCKER_REPO:$DOCKER_TAG" - - pushd "$CONTEXT_PATH" - DOCKER_TAG="$DOCKER_TAG" DOCKER_REPO="$DOCKER_REPO" DOCKERFILE_PATH="$DOCKERFILE_PATH" IMAGE_NAME="$IMAGE_NAME" bash hooks/pre_build - DOCKER_TAG="$DOCKER_TAG" DOCKER_REPO="$DOCKER_REPO" DOCKERFILE_PATH="$DOCKERFILE_PATH" IMAGE_NAME="$IMAGE_NAME" bash hooks/build - popd - - Cleanup +for DOCKER_REPO in "${CERTBOT_PLUGINS_DOCKER_REPOS[@]}"; do + Build "${DOCKER_REPO}" "$CERTBOT_VERSION" "$WORK_DIR/plugin" done + +Cleanup diff --git a/tools/docker/core/.gitignore b/tools/docker/core/.gitignore new file mode 100644 index 000000000..4cc493afa --- /dev/null +++ b/tools/docker/core/.gitignore @@ -0,0 +1 @@ +qemu-*-static diff --git a/tools/docker/core/Dockerfile b/tools/docker/core/Dockerfile index 2b0ca2b0c..1cf71dc2f 100644 --- a/tools/docker/core/Dockerfile +++ b/tools/docker/core/Dockerfile @@ -1,4 +1,11 @@ -FROM python:3.7-alpine3.10 +# Docker Arch (amd64, arm32v6, ...) +ARG TARGET_ARCH +FROM ${TARGET_ARCH}/python:3.7-alpine3.10 + +# Qemu Arch (x86_64, arm, ...) +ARG QEMU_ARCH +ENV QEMU_ARCH=${QEMU_ARCH} +COPY qemu-${QEMU_ARCH}-static /usr/bin/ ARG CERTBOT_VERSION ENV CERTBOT_VERSION=${CERTBOT_VERSION} diff --git a/tools/docker/core/hooks/build b/tools/docker/core/hooks/build index e0e4d6571..9f3f035d9 100644 --- a/tools/docker/core/hooks/build +++ b/tools/docker/core/hooks/build @@ -1,5 +1,11 @@ #!/bin/bash set -ex -CERTBOT_VERSION=${DOCKER_TAG//v/} -docker build --build-arg CERTBOT_VERSION=${CERTBOT_VERSION} -f ${DOCKERFILE_PATH} -t ${IMAGE_NAME} . +WORK_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +source "$WORK_DIR/../../lib/common" + +CERTBOT_VERSION=$(GetCerbotVersionFromTag "$DOCKER_TAG") + +for TARGET_ARCH in "${ALL_TARGET_ARCH[@]}"; do + BuildDockerCoreImage "${TARGET_ARCH}" "${CERTBOT_VERSION}" +done diff --git a/tools/docker/core/hooks/post_push b/tools/docker/core/hooks/post_push index 6b8459521..6bac191fd 100644 --- a/tools/docker/core/hooks/post_push +++ b/tools/docker/core/hooks/post_push @@ -1,5 +1,12 @@ #!/bin/bash set -ex -docker tag ${IMAGE_NAME} "${DOCKER_REPO}:latest" -docker push "${DOCKER_REPO}:latest" +WORK_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +source "$WORK_DIR/../../lib/common" + +CERTBOT_VERSION=$(GetCerbotVersionFromTag "$DOCKER_TAG") + +for TARGET_ARCH in "${ALL_TARGET_ARCH[@]}"; do + TagDockerImageAliases "${TARGET_ARCH}" "${CERTBOT_VERSION}" + PushDockerImageAliases "${TARGET_ARCH}" "${CERTBOT_VERSION}" +done diff --git a/tools/docker/core/hooks/pre_build b/tools/docker/core/hooks/pre_build new file mode 100755 index 000000000..723e35161 --- /dev/null +++ b/tools/docker/core/hooks/pre_build @@ -0,0 +1,10 @@ +#!/bin/bash +set -ex + +WORK_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +source "$WORK_DIR/../../lib/common" + +RegisterQemuHandlers +for TARGET_ARCH in "${ALL_TARGET_ARCH[@]}"; do + DownloadQemuStatic "${TARGET_ARCH}" +done diff --git a/tools/docker/core/hooks/push b/tools/docker/core/hooks/push new file mode 100644 index 000000000..4dc5ea080 --- /dev/null +++ b/tools/docker/core/hooks/push @@ -0,0 +1,11 @@ +#!/bin/bash +set -ex + +WORK_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +source "$WORK_DIR/../../lib/common" + +CERTBOT_VERSION=$(GetCerbotVersionFromTag "$DOCKER_TAG") + +for TARGET_ARCH in "${ALL_TARGET_ARCH[@]}"; do + PushDockerImage "${TARGET_ARCH}" "${CERTBOT_VERSION}" +done diff --git a/tools/docker/deploy.sh b/tools/docker/deploy.sh index e6960f67d..9ff4f52e5 100755 --- a/tools/docker/deploy.sh +++ b/tools/docker/deploy.sh @@ -18,14 +18,14 @@ Cleanup() { WORK_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" CERTBOT_DOCKER_VERSION="$1" # Eg. v0.35.0 or v0.35.0-1 -CERTBOT_VERSION=$(sed -E -e 's|(v[0-9+]\.[0-9]+\.[0-9]+).*|\1|g' <<< $CERTBOT_DOCKER_VERSION) # Eg. v0.35.0 -BRANCH_NAME=$(sed -E -e 's|v(.*)\.[0-9]+|\1.x|g' <<< $CERTBOT_VERSION) # Eg. 0.35.x +CERTBOT_VERSION=$(sed -E -e 's|(v[0-9+]\.[0-9]+\.[0-9]+).*|\1|g' <<< "$CERTBOT_DOCKER_VERSION") # Eg. v0.35.0 +BRANCH_NAME=$(sed -E -e 's|v(.*)\.[0-9]+|\1.x|g' <<< "$CERTBOT_VERSION") # Eg. 0.35.x -sed -i -e "s|current-.*-blue\.svg|current-$CERTBOT_VERSION-blue.svg|g" core/README.md -sed -i -e "s|branch=.*)\]|branch=$BRANCH_NAME)]|g" core/README.md +sed -i -e "s|current-.*-blue\\.svg|current-$CERTBOT_VERSION-blue.svg|g" core/README.md +sed -i -e "s|branch=.*)\\]|branch=$BRANCH_NAME)]|g" core/README.md -sed -i -e "s|current-.*-blue\.svg|current-$CERTBOT_VERSION-blue.svg|g" plugin/README.md -sed -i -e "s|branch=.*)\]|branch=$BRANCH_NAME)]|g" plugin/README.md +sed -i -e "s|current-.*-blue\\.svg|current-$CERTBOT_VERSION-blue.svg|g" plugin/README.md +sed -i -e "s|branch=.*)\\]|branch=$BRANCH_NAME)]|g" plugin/README.md pushd "$WORK_DIR" git commit -a -m "Release version $CERTBOT_DOCKER_VERSION" --allow-empty diff --git a/tools/docker/lib/common b/tools/docker/lib/common new file mode 100644 index 000000000..35f473603 --- /dev/null +++ b/tools/docker/lib/common @@ -0,0 +1,142 @@ +#!/bin/bash +set -ex + +# Current supported architectures +export ALL_TARGET_ARCH=(amd64 arm32v6 arm64v8) + +# Architecture used in tags with no architecture especified (certbot/certbot:latest, certbot/cerbot:v0.35.0, ...) +export DEFAULT_ARCH=amd64 + +# Returns certbot version (ex. v0.35.0 returns 0.35.0) +# Usage: GetCerbotVersionFromTag +GetCerbotVersionFromTag() { + TAG=$1 + echo "${TAG//v/}" +} + +# Returns the translation from Docker to QEMU architecture +# Usage: GetQemuArch [amd64|arm32v6|arm64v8] +GetQemuArch() { + ARCH=$1 + + case "$ARCH" in + "amd64") + echo "x86_64" + ;; + "arm32v6") + echo "arm" + ;; + "arm64v8") + echo "aarch64" + ;; + "*") + echo "Not supported build architecture '$1'." >&2 + exit -1 + esac +} + +# Downloads QEMU static binary file for architecture +# Usage: DownloadQemuStatic [x86_64|arm|aarch64] +DownloadQemuStatic() { + ARCH=$1 + + QEMU_ARCH=$(GetQemuArch "$ARCH") + if [ ! -f "qemu-${QEMU_ARCH}-static" ]; then + QEMU_DOWNLOAD_URL="https://github.com/multiarch/qemu-user-static/releases/download" + QEMU_LATEST_TAG=$(curl -s https://api.github.com/repos/multiarch/qemu-user-static/tags \ + | grep 'name.*v[0-9]' \ + | head -n 1 \ + | cut -d '"' -f 4) + curl -SL "${QEMU_DOWNLOAD_URL}/${QEMU_LATEST_TAG}/x86_64_qemu-$QEMU_ARCH-static.tar.gz" \ + | tar xzv + fi +} + +# Executes the QEMU register script +# Usage: RegisterQemuHandlers +RegisterQemuHandlers() { + docker run --rm --privileged multiarch/qemu-user-static:register --reset +} + +# Builds docker certbot core image for a specific architecture and certbot version (ex. 0.35.0). +# Usage: BuildDockerCoreImage [amd64|arm32v6|arm64v8] +BuildDockerCoreImage() { + ARCH=$1 + VERSION=$2 + + QEMU=$(GetQemuArch "$ARCH") + docker build \ + --build-arg CERTBOT_VERSION="${VERSION}" \ + --build-arg TARGET_ARCH="${ARCH}" \ + --build-arg QEMU_ARCH="${QEMU}" \ + -f "${DOCKERFILE_PATH}" \ + -t "${DOCKER_REPO}:${ARCH}-v${VERSION}" \ + . +} + +# Builds docker certbot plugin image for a specific architecture and certbot version (ex. 0.35.0). +# Usage: BuildDockerPluginImage [amd64|arm32v6|arm64v8] +BuildDockerPluginImage() { + ARCH=$1 + VERSION=$2 + PLUGIN=$3 + + QEMU=$(GetQemuArch "$ARCH") + docker build \ + --build-arg CERTBOT_VERSION="${VERSION}" \ + --build-arg TARGET_ARCH="${ARCH}" \ + --build-arg QEMU_ARCH="${QEMU}" \ + --build-arg PLUGIN_NAME="${PLUGIN}" \ + -f "${DOCKERFILE_PATH}" \ + -t "${DOCKER_REPO}:${ARCH}-v${VERSION}" \ + . +} + +# Pushes docker image for a specific architecture and certbot version (ex. 0.35.0). +# Usage: BuildDockerCoreImage [amd64|arm32v6|arm64v8] +PushDockerImage() { + ARCH=$1 + VERSION=$2 + + docker push "${DOCKER_REPO}:${ARCH}-v${VERSION}" +} + +# Creates docker image "latest" tag for a specific architecture and certbot version. +# In case of default architecture, it also creates tags without architecture part. +# As an example, for version 0.35.0 in amd64 (default arquitecture): +# - certbot/certbot:v0.35.0 +# - certbot/certbot:latest +# - certbot/certbot:amd64-latest +# For version 0.35.0 in arm32v6: +# - certbot/certbot:arm32v6-latest +# Usage: TagDockerImageAliases [amd64|arm32v6|arm64v8] +TagDockerImageAliases() { + ARCH=$1 + VERSION=$2 + + docker tag "${DOCKER_REPO}:${ARCH}-v${VERSION}" "${DOCKER_REPO}:${ARCH}-latest" + if [ "${ARCH}" == "${DEFAULT_ARCH}" ]; then + docker tag "${DOCKER_REPO}:${ARCH}-v${VERSION}" "${DOCKER_REPO}:v${VERSION}" + docker tag "${DOCKER_REPO}:${ARCH}-v${VERSION}" "${DOCKER_REPO}:latest" + fi +} + +# Pushes docker "latest" image for a specific architecture and certbot version. +# In case of default architecture, it also pushes image without architecture part. +# As an example, for version 0.35.0 in amd64 (default arquitecture): +# - certbot/certbot:v0.35.0 +# - certbot/certbot:latest +# - certbot/certbot:amd64-latest +# For version 0.35.0 in arm32v6: +# - certbot/certbot:arm32v6-latest +# Usage: PushDockerImageAliases [amd64|arm32v6|arm64v8] +PushDockerImageAliases() { + ARCH=$1 + VERSION=$2 + + docker push "${DOCKER_REPO}:${ARCH}-latest" + if [ "${ARCH}" == "${DEFAULT_ARCH}" ]; then + docker push "${DOCKER_REPO}:v${VERSION}" + docker push "${DOCKER_REPO}:latest" + fi +} diff --git a/tools/docker/plugin/.gitignore b/tools/docker/plugin/.gitignore new file mode 100644 index 000000000..4cc493afa --- /dev/null +++ b/tools/docker/plugin/.gitignore @@ -0,0 +1 @@ +qemu-*-static diff --git a/tools/docker/plugin/Dockerfile b/tools/docker/plugin/Dockerfile index f249a64e6..9369ba0d3 100644 --- a/tools/docker/plugin/Dockerfile +++ b/tools/docker/plugin/Dockerfile @@ -1,4 +1,12 @@ -FROM certbot/certbot +# Docker Arch (amd64, arm32v6, ...) +ARG TARGET_ARCH +ARG CERTBOT_VERSION +FROM certbot/certbot:${TARGET_ARCH}-v${CERTBOT_VERSION} + +# Qemu Arch (x86_64, arm, ...) +ARG QEMU_ARCH +ENV QEMU_ARCH=${QEMU_ARCH} +COPY qemu-${QEMU_ARCH}-static /usr/bin/ ARG PLUGIN_NAME @@ -6,7 +14,7 @@ ARG PLUGIN_NAME RUN wget -O certbot-${CERTBOT_VERSION}.tar.gz https://github.com/certbot/certbot/archive/v${CERTBOT_VERSION}.tar.gz \ && tar xf certbot-${CERTBOT_VERSION}.tar.gz \ && cp -r certbot-${CERTBOT_VERSION}/certbot-${PLUGIN_NAME} /opt/certbot/src/certbot-${PLUGIN_NAME} \ - && rm -rf certbot-${CERTBOT_VERSION}.tar.gz certbot-${CERTBOT_VERSION} + && rm -rf certbot-${CERTBOT_VERSION}.tar.gz certbot-${CERTBOT_VERSION} # Install the DNS plugin RUN pip install --constraint /opt/certbot/docker_constraints.txt --no-cache-dir --editable /opt/certbot/src/certbot-${PLUGIN_NAME} diff --git a/tools/docker/plugin/hooks/build b/tools/docker/plugin/hooks/build index 435b1d42b..4545bbb3a 100644 --- a/tools/docker/plugin/hooks/build +++ b/tools/docker/plugin/hooks/build @@ -1,5 +1,12 @@ #!/bin/bash set -ex +WORK_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +source "$WORK_DIR/../../lib/common" + +CERTBOT_VERSION=$(GetCerbotVersionFromTag "$DOCKER_TAG") PLUGIN_NAME=${DOCKER_REPO//*\//} -docker build --build-arg PLUGIN_NAME=${PLUGIN_NAME} -f ${DOCKERFILE_PATH} -t ${IMAGE_NAME} . + +for TARGET_ARCH in "${ALL_TARGET_ARCH[@]}"; do + BuildDockerPluginImage "${TARGET_ARCH}" "${CERTBOT_VERSION}" "${PLUGIN_NAME}" +done diff --git a/tools/docker/plugin/hooks/post_push b/tools/docker/plugin/hooks/post_push index 6b8459521..6bac191fd 100644 --- a/tools/docker/plugin/hooks/post_push +++ b/tools/docker/plugin/hooks/post_push @@ -1,5 +1,12 @@ #!/bin/bash set -ex -docker tag ${IMAGE_NAME} "${DOCKER_REPO}:latest" -docker push "${DOCKER_REPO}:latest" +WORK_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +source "$WORK_DIR/../../lib/common" + +CERTBOT_VERSION=$(GetCerbotVersionFromTag "$DOCKER_TAG") + +for TARGET_ARCH in "${ALL_TARGET_ARCH[@]}"; do + TagDockerImageAliases "${TARGET_ARCH}" "${CERTBOT_VERSION}" + PushDockerImageAliases "${TARGET_ARCH}" "${CERTBOT_VERSION}" +done diff --git a/tools/docker/plugin/hooks/pre_build b/tools/docker/plugin/hooks/pre_build index 22c582758..723e35161 100644 --- a/tools/docker/plugin/hooks/pre_build +++ b/tools/docker/plugin/hooks/pre_build @@ -1,5 +1,10 @@ #!/bin/bash set -ex -CERTBOT_VERSION=${DOCKER_TAG//v/} -docker build --build-arg CERTBOT_VERSION=${CERTBOT_VERSION} -f ../core/Dockerfile -t certbot/certbot ../core +WORK_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +source "$WORK_DIR/../../lib/common" + +RegisterQemuHandlers +for TARGET_ARCH in "${ALL_TARGET_ARCH[@]}"; do + DownloadQemuStatic "${TARGET_ARCH}" +done diff --git a/tools/docker/plugin/hooks/push b/tools/docker/plugin/hooks/push new file mode 100644 index 000000000..4dc5ea080 --- /dev/null +++ b/tools/docker/plugin/hooks/push @@ -0,0 +1,11 @@ +#!/bin/bash +set -ex + +WORK_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +source "$WORK_DIR/../../lib/common" + +CERTBOT_VERSION=$(GetCerbotVersionFromTag "$DOCKER_TAG") + +for TARGET_ARCH in "${ALL_TARGET_ARCH[@]}"; do + PushDockerImage "${TARGET_ARCH}" "${CERTBOT_VERSION}" +done From 5e01467e2c54ea7fede80df7a8c500587efd1534 Mon Sep 17 00:00:00 2001 From: Erica Portnoy Date: Tue, 5 Nov 2019 15:08:42 -0800 Subject: [PATCH 14/36] Release version v0.40.0 --- tools/docker/core/README.md | 2 +- tools/docker/plugin/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/docker/core/README.md b/tools/docker/core/README.md index fe2d807e0..a1e5beafa 100644 --- a/tools/docker/core/README.md +++ b/tools/docker/core/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v0.39.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.39.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v0.40.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.40.x)](https://travis-ci.com/certbot/certbot) This is the Docker repository for Certbot Core. diff --git a/tools/docker/plugin/README.md b/tools/docker/plugin/README.md index c2b6f2869..d4f719a22 100644 --- a/tools/docker/plugin/README.md +++ b/tools/docker/plugin/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v0.39.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.39.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v0.40.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.40.x)](https://travis-ci.com/certbot/certbot) This is one of the Docker repository for the Certbot DNS plugins. From a730b00a36983df13b06c6db1345712517a405c7 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 5 Nov 2019 19:47:14 -0800 Subject: [PATCH 15/36] Release version v0.40.1 --- tools/docker/core/README.md | 2 +- tools/docker/plugin/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/docker/core/README.md b/tools/docker/core/README.md index a1e5beafa..49994303c 100644 --- a/tools/docker/core/README.md +++ b/tools/docker/core/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v0.40.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.40.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v0.40.1-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.40.x)](https://travis-ci.com/certbot/certbot) This is the Docker repository for Certbot Core. diff --git a/tools/docker/plugin/README.md b/tools/docker/plugin/README.md index d4f719a22..9c4da580d 100644 --- a/tools/docker/plugin/README.md +++ b/tools/docker/plugin/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v0.40.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.40.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v0.40.1-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.40.x)](https://travis-ci.com/certbot/certbot) This is one of the Docker repository for the Certbot DNS plugins. From ea44834c419dc85ae9ea70e12a98bf379a451ab8 Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Mon, 2 Dec 2019 21:39:55 +0100 Subject: [PATCH 16/36] Fix docker build regarding the new certbot layout (#11) This PR adds appropriate corrections to certbot dockerfile to work with the new layout (moving certbot python project in its own subdirectory). This PR has been tested with success using the `build.sh` script on a fake v1.0 version of certbot published on my fork (https://github.com/adferrand/certbot/releases/tag/v1.0) instead of archives from `certbot/certbot`. --- tools/docker/core/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/docker/core/Dockerfile b/tools/docker/core/Dockerfile index 1cf71dc2f..4034eb67d 100644 --- a/tools/docker/core/Dockerfile +++ b/tools/docker/core/Dockerfile @@ -19,7 +19,7 @@ WORKDIR /opt/certbot RUN mkdir -p src \ && wget -O certbot-${CERTBOT_VERSION}.tar.gz https://github.com/certbot/certbot/archive/v${CERTBOT_VERSION}.tar.gz \ && tar xf certbot-${CERTBOT_VERSION}.tar.gz \ - && cp certbot-${CERTBOT_VERSION}/CHANGELOG.md certbot-${CERTBOT_VERSION}/README.rst certbot-${CERTBOT_VERSION}/setup.py src/ \ + && cp certbot-${CERTBOT_VERSION}/CHANGELOG.md certbot-${CERTBOT_VERSION}/README.rst src/ \ && cp certbot-${CERTBOT_VERSION}/letsencrypt-auto-source/pieces/dependency-requirements.txt . \ && cp -r certbot-${CERTBOT_VERSION}/tools tools \ && cp -r certbot-${CERTBOT_VERSION}/acme src/acme \ @@ -48,5 +48,5 @@ RUN apk add --no-cache --virtual .build-deps \ && pip install -r dependency-requirements.txt \ && pip install --no-cache-dir --no-deps \ --editable src/acme \ - --editable src \ + --editable src/certbot \ && apk del .build-deps From b92eb6f620667ea46446ecc91ecd995fa7f54ef3 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 3 Dec 2019 10:17:50 -0800 Subject: [PATCH 17/36] Release version v1.0.0 --- tools/docker/core/README.md | 2 +- tools/docker/plugin/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/docker/core/README.md b/tools/docker/core/README.md index 49994303c..2f78a097f 100644 --- a/tools/docker/core/README.md +++ b/tools/docker/core/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v0.40.1-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.40.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v1.0.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.0.x)](https://travis-ci.com/certbot/certbot) This is the Docker repository for Certbot Core. diff --git a/tools/docker/plugin/README.md b/tools/docker/plugin/README.md index 9c4da580d..67c5bf866 100644 --- a/tools/docker/plugin/README.md +++ b/tools/docker/plugin/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v0.40.1-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=0.40.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v1.0.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.0.x)](https://travis-ci.com/certbot/certbot) This is one of the Docker repository for the Certbot DNS plugins. From c194381f04778791aee115dac32ccbf118e031dc Mon Sep 17 00:00:00 2001 From: Guillaume Vincent Date: Thu, 2 Jan 2020 20:27:47 +0100 Subject: [PATCH 18/36] Fix broken link (#12) --- tools/docker/core/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/docker/core/README.md b/tools/docker/core/README.md index 2f78a097f..8a6ace518 100644 --- a/tools/docker/core/README.md +++ b/tools/docker/core/README.md @@ -22,5 +22,5 @@ This is the Docker repository for Certbot Core. ## Sources: -* [docker](https://www.github.com/certbot/certbot-docker.git) +* [docker](https://www.github.com/certbot-docker/certbot-docker.git) * [certbot](https://www.github.com/certbot/certbot.git) From 5713decf237369ba84060f232cdbfc7339f305ae Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Thu, 2 Jan 2020 15:41:10 -0500 Subject: [PATCH 19/36] Update other links to point to new GH org. (#13) --- tools/docker/README.md | 2 +- tools/docker/plugin/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/docker/README.md b/tools/docker/README.md index 966c6be74..5f71013c9 100644 --- a/tools/docker/README.md +++ b/tools/docker/README.md @@ -23,7 +23,7 @@ To setup the publication process, the target DockerHub project must be configure 1) Define a GitHub user with push rights to the current GIT repository. 2) Create the DockerHub project if necessary. -3) Activate the AutoBuild feature, using the current GIT repository as source (eg. https.//github.com/certbot/certbot-docker.git) and the user defined in 1). +3) Activate the AutoBuild feature, using the current GIT repository as source (eg. https://github.com/certbot-docker/certbot-docker.git) and the user defined in 1). 4) Define a unique tag build rule in AutoBuild configuration: _For a Certbot core Docker_ -> Source: `/^(v[0-9.]+).*$/`, Tag: `{\1}`, Dockerfile: `Dockerfile`, Build context: `/core` diff --git a/tools/docker/plugin/README.md b/tools/docker/plugin/README.md index 67c5bf866..b3c4f91d1 100644 --- a/tools/docker/plugin/README.md +++ b/tools/docker/plugin/README.md @@ -9,5 +9,5 @@ This is one of the Docker repository for the Certbot DNS plugins. ## Sources: -* [docker](https://www.github.com/certbot/certbot-docker.git) +* [docker](https://www.github.com/certbot-docker/certbot-docker.git) * [certbot](https://www.github.com/certbot/certbot.git) From fb323e083a786f939fddfc02f3f71d0d4e90b80d Mon Sep 17 00:00:00 2001 From: J0WI Date: Sat, 11 Jan 2020 01:36:58 +0000 Subject: [PATCH 20/36] Update Alpine to 3.11 (#14) --- tools/docker/core/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/docker/core/Dockerfile b/tools/docker/core/Dockerfile index 4034eb67d..d86e08958 100644 --- a/tools/docker/core/Dockerfile +++ b/tools/docker/core/Dockerfile @@ -1,6 +1,6 @@ # Docker Arch (amd64, arm32v6, ...) ARG TARGET_ARCH -FROM ${TARGET_ARCH}/python:3.7-alpine3.10 +FROM ${TARGET_ARCH}/python:3.7-alpine3.11 # Qemu Arch (x86_64, arm, ...) ARG QEMU_ARCH From 695107bc98b27b718cbc3d251520172a88a323ce Mon Sep 17 00:00:00 2001 From: J0WI Date: Mon, 13 Jan 2020 18:39:36 +0000 Subject: [PATCH 21/36] Update Python to 3.8 (#16) https://github.com/certbot/certbot/pull/7392 --- tools/docker/core/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/docker/core/Dockerfile b/tools/docker/core/Dockerfile index d86e08958..16fbbfd01 100644 --- a/tools/docker/core/Dockerfile +++ b/tools/docker/core/Dockerfile @@ -1,6 +1,6 @@ # Docker Arch (amd64, arm32v6, ...) ARG TARGET_ARCH -FROM ${TARGET_ARCH}/python:3.7-alpine3.11 +FROM ${TARGET_ARCH}/python:3.8-alpine3.11 # Qemu Arch (x86_64, arm, ...) ARG QEMU_ARCH From 78624a2b8c6fb164a68defc6794f37e6ffb806b0 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 14 Jan 2020 11:49:36 -0800 Subject: [PATCH 22/36] Release version v1.1.0 --- tools/docker/core/README.md | 2 +- tools/docker/plugin/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/docker/core/README.md b/tools/docker/core/README.md index 8a6ace518..d63af39a3 100644 --- a/tools/docker/core/README.md +++ b/tools/docker/core/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v1.0.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.0.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v1.1.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.1.x)](https://travis-ci.com/certbot/certbot) This is the Docker repository for Certbot Core. diff --git a/tools/docker/plugin/README.md b/tools/docker/plugin/README.md index b3c4f91d1..116886ce9 100644 --- a/tools/docker/plugin/README.md +++ b/tools/docker/plugin/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v1.0.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.0.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v1.1.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.1.x)](https://travis-ci.com/certbot/certbot) This is one of the Docker repository for the Certbot DNS plugins. From a180d5d5c98b6f4f6789a60acd4adac5bff466fb Mon Sep 17 00:00:00 2001 From: Erica Portnoy Date: Tue, 4 Feb 2020 15:34:00 -0800 Subject: [PATCH 23/36] Release version v1.2.0 --- tools/docker/core/README.md | 2 +- tools/docker/plugin/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/docker/core/README.md b/tools/docker/core/README.md index d63af39a3..cebe1eac5 100644 --- a/tools/docker/core/README.md +++ b/tools/docker/core/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v1.1.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.1.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v1.2.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.2.x)](https://travis-ci.com/certbot/certbot) This is the Docker repository for Certbot Core. diff --git a/tools/docker/plugin/README.md b/tools/docker/plugin/README.md index 116886ce9..4946acca6 100644 --- a/tools/docker/plugin/README.md +++ b/tools/docker/plugin/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v1.1.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.1.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v1.2.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.2.x)](https://travis-ci.com/certbot/certbot) This is one of the Docker repository for the Certbot DNS plugins. From bca73f99329d70fd4834a52113ef1a0ea2410087 Mon Sep 17 00:00:00 2001 From: ohemorange Date: Wed, 5 Feb 2020 16:08:57 -0800 Subject: [PATCH 24/36] Grammar improvements (#18) Update the README with improved grammar. --- tools/docker/README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tools/docker/README.md b/tools/docker/README.md index 5f71013c9..7bbbc165a 100644 --- a/tools/docker/README.md +++ b/tools/docker/README.md @@ -4,20 +4,20 @@ Certbot-Docker project Goal ---- -This project is used to publish on DockerHub a new version of the official Certbot Docker, and related Certbot DNS plugins Dockers, upon release of a new version of Certbot. +This project is used to publish a new version of the official Certbot Docker and related Certbot DNS plugins Dockers on DockerHub upon release of a new version of Certbot. It leverages the AutoBuild features of DockerHub to coordinate this publication through a continous integration/deployment approach. High-level behavior ------------------- -When a new version tag (eg. v0.35.0) is pushed to this repository, it triggers a new build in each DockerHub project, to construct and publish the new version of the Docker, -containing the Certbot version corresponding to the pushed tag. With the example of the v0.35.0, the DockerHub projects will contain after few minutes a new tag v0.35.0, -whose the Docker contains Certbot v0.35.0. +When a new version tag (eg. v0.35.0) is pushed to this repository, it triggers a new build in each DockerHub project, to construct and publish the new version of the Docker +containing the Certbot version corresponding to the pushed tag. For example, after following the instructions for v0.35.0 below, after a few minutes the DockerHub projects will contain a new tag "v0.35.0", +whose Docker contains Certbot v0.35.0. Configuration ------------- -To setup the publication process, the target DockerHub project must be configured appropriately. There are two types of DockerHub projects to take into account: +To set up the publication process, the target DockerHub project must be configured appropriately. There are two types of DockerHub projects to take into account: * the Docker project for Certbot core features (eg. certbot/certbot) * a Docker project for Certbot DNS plugins (eg. certbot/dns-rfc2136) @@ -35,9 +35,9 @@ Publication worfklow Assuming the version to publish is `v0.35.0` -1) Clone this repository locally, checkout branch `master` and ensure to have a clean workspace. -2) (Optional) Execute `./build.sh v0.35.0` to test the Dockers builds. -3) Execute `./deploy.sh v0.35.0` to trigger the publication of all Dockers with `v0.35.0` version. +1) Clone this repository locally, check out branch `master`, and ensure the workspace is clean. +2) (Optional) Execute `./build.sh v0.35.0` to test the Docker builds. +3) Execute `./deploy.sh v0.35.0` to trigger the publication of all Dockers with version `v0.35.0`. Scripts usage ------------- @@ -46,16 +46,16 @@ Scripts usage ./build.sh [VERSION] ``` -This script will build locally all Dockers for the given version using the same runtime than DockerHub. +This script will locally build all Dockers for the given version using the same runtime as DockerHub. This can be used to test the build process before invoking the actual publication workflow. ``` ./deploy [VERSION] ``` -This script will trigger the publication on DockerHub of all Dockers for the given version. To do so, this script: -- update the relevant `README.md` files that will be used as description in the DockerHub repositories, -- commit locally the modifications, +This script will trigger the publication of all Dockers for the given version to DockerHub. To do so, this script will: +- update the relevant `README.md` files that will be used as descriptions in the DockerHub repositories, +- locally commit the modifications, - tag this commit with the given version, - push this tag and the updated `master` branch. From bc5b079b2a92c2b55d9abb99559f01e0dcfbdd3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Thu, 27 Feb 2020 20:23:18 +0100 Subject: [PATCH 25/36] Add a paragraph about Docker & Certbot to README (#22) This partly addresses issue certbot-docker#2 --- tools/docker/README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/docker/README.md b/tools/docker/README.md index 7bbbc165a..23e0d3228 100644 --- a/tools/docker/README.md +++ b/tools/docker/README.md @@ -1,3 +1,12 @@ +Running Certbot in Docker +========================= + +Docker is an amazingly simple and quick way to obtain a certificate. However, this mode of operation is unable to install certificates or configure your webserver, because our installer plugins cannot reach your webserver from inside the Docker container. + +**Most users should install Certbot by following the installation instructions at https://certbot.eff.org/instructions. You should only use Docker if you are sure you know what you are doing and have a good reason to do so.** + +For more information, please read [Certbot - Running with Docker](https://certbot.eff.org/docs/install.html#running-with-docker). + Certbot-Docker project ====================== @@ -31,7 +40,7 @@ To set up the publication process, the target DockerHub project must be configur _For a Certbot DNS plugin Docker_ -> Source: `/^(v[0-9.]+).*$/`, Tag: `{\1}`, Dockerfile: `Dockerfile`, Build context: `/plugin` Publication worfklow --------------------- +------------------- Assuming the version to publish is `v0.35.0` From 9483b33ec1d68e1b8930c5d55dd2421b3d5eda30 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 3 Mar 2020 13:29:23 -0800 Subject: [PATCH 26/36] Release version v1.3.0 --- tools/docker/core/README.md | 2 +- tools/docker/plugin/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/docker/core/README.md b/tools/docker/core/README.md index cebe1eac5..f7803cec2 100644 --- a/tools/docker/core/README.md +++ b/tools/docker/core/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v1.2.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.2.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v1.3.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.3.x)](https://travis-ci.com/certbot/certbot) This is the Docker repository for Certbot Core. diff --git a/tools/docker/plugin/README.md b/tools/docker/plugin/README.md index 4946acca6..50ff58b09 100644 --- a/tools/docker/plugin/README.md +++ b/tools/docker/plugin/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v1.2.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.2.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v1.3.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.3.x)](https://travis-ci.com/certbot/certbot) This is one of the Docker repository for the Certbot DNS plugins. From 361d1f732efd87df47ae07eabdcd2aef9e9eb4ff Mon Sep 17 00:00:00 2001 From: Erica Portnoy Date: Tue, 5 May 2020 14:45:57 -0700 Subject: [PATCH 27/36] Release version v1.4.0 --- tools/docker/core/README.md | 2 +- tools/docker/plugin/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/docker/core/README.md b/tools/docker/core/README.md index f7803cec2..f8e91283b 100644 --- a/tools/docker/core/README.md +++ b/tools/docker/core/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v1.3.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.3.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v1.4.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.4.x)](https://travis-ci.com/certbot/certbot) This is the Docker repository for Certbot Core. diff --git a/tools/docker/plugin/README.md b/tools/docker/plugin/README.md index 50ff58b09..9229fab47 100644 --- a/tools/docker/plugin/README.md +++ b/tools/docker/plugin/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v1.3.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.3.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v1.4.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.4.x)](https://travis-ci.com/certbot/certbot) This is one of the Docker repository for the Certbot DNS plugins. From 3a997a56312a0a3deec6066a3f96cd8012040565 Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Wed, 6 May 2020 02:10:51 +0200 Subject: [PATCH 28/36] Install pipstrap to pin setuptools/pip/wheels, since setuptools and pip continues to play with us. (#23) So, setuptools broke the installation setup, by removing a deprecated API that is still used by some of our dependencies (see pypa/setuptools#2017) This PR fixes the Docker build by using pipstrap to pin pip/setuptools/wheels, like it is done in several critical places (certbot-auto, ...). An issue in certbot is opened to fix more generally the problem in most recent versions of setuptools: certbot/certbot#7976 It rebuilt locally all dockers (certbot + dns plugins) for the three architectures, and all have passed. --- tools/docker/core/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/docker/core/Dockerfile b/tools/docker/core/Dockerfile index 16fbbfd01..2afd148e7 100644 --- a/tools/docker/core/Dockerfile +++ b/tools/docker/core/Dockerfile @@ -21,6 +21,7 @@ RUN mkdir -p src \ && tar xf certbot-${CERTBOT_VERSION}.tar.gz \ && cp certbot-${CERTBOT_VERSION}/CHANGELOG.md certbot-${CERTBOT_VERSION}/README.rst src/ \ && cp certbot-${CERTBOT_VERSION}/letsencrypt-auto-source/pieces/dependency-requirements.txt . \ + && cp certbot-${CERTBOT_VERSION}/letsencrypt-auto-source/pieces/pipstrap.py . \ && cp -r certbot-${CERTBOT_VERSION}/tools tools \ && cp -r certbot-${CERTBOT_VERSION}/acme src/acme \ && cp -r certbot-${CERTBOT_VERSION}/certbot src/certbot \ @@ -45,6 +46,7 @@ RUN apk add --no-cache --virtual .build-deps \ openssl-dev \ musl-dev \ libffi-dev \ + && python pipstrap.py \ && pip install -r dependency-requirements.txt \ && pip install --no-cache-dir --no-deps \ --editable src/acme \ From d8e9f558c22895fb78de4ae0f0d520e4a5db0b83 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 5 May 2020 17:11:24 -0700 Subject: [PATCH 29/36] Release version v1.4.0-2 From 8192e3eb85b994aced6df2bb93bac458f620eae5 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 2 Jun 2020 11:43:12 -0700 Subject: [PATCH 30/36] Release version v1.5.0 --- tools/docker/core/README.md | 2 +- tools/docker/plugin/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/docker/core/README.md b/tools/docker/core/README.md index f8e91283b..8f5a43cf7 100644 --- a/tools/docker/core/README.md +++ b/tools/docker/core/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v1.4.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.4.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v1.5.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.5.x)](https://travis-ci.com/certbot/certbot) This is the Docker repository for Certbot Core. diff --git a/tools/docker/plugin/README.md b/tools/docker/plugin/README.md index 9229fab47..4e4c91973 100644 --- a/tools/docker/plugin/README.md +++ b/tools/docker/plugin/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v1.4.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.4.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v1.5.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.5.x)](https://travis-ci.com/certbot/certbot) This is one of the Docker repository for the Certbot DNS plugins. From 88e183e69e73733b93176380813c10eac772f353 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 7 Jul 2020 11:04:52 -0700 Subject: [PATCH 31/36] Release version 1.6.0 --- tools/docker/core/README.md | 2 +- tools/docker/plugin/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/docker/core/README.md b/tools/docker/core/README.md index 8f5a43cf7..a1f667f18 100644 --- a/tools/docker/core/README.md +++ b/tools/docker/core/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v1.5.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.5.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-1.6.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.6.0)](https://travis-ci.com/certbot/certbot) This is the Docker repository for Certbot Core. diff --git a/tools/docker/plugin/README.md b/tools/docker/plugin/README.md index 4e4c91973..354cee5bf 100644 --- a/tools/docker/plugin/README.md +++ b/tools/docker/plugin/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v1.5.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.5.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-1.6.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.6.0)](https://travis-ci.com/certbot/certbot) This is one of the Docker repository for the Certbot DNS plugins. From d64bb81864c1609e1e99efb0fd0a6459765eee1c Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 7 Jul 2020 11:18:06 -0700 Subject: [PATCH 32/36] Fix typo (#26) --- tools/docker/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/docker/README.md b/tools/docker/README.md index 23e0d3228..197b83b9a 100644 --- a/tools/docker/README.md +++ b/tools/docker/README.md @@ -59,7 +59,7 @@ This script will locally build all Dockers for the given version using the same This can be used to test the build process before invoking the actual publication workflow. ``` -./deploy [VERSION] +./deploy.sh [VERSION] ``` This script will trigger the publication of all Dockers for the given version to DockerHub. To do so, this script will: From a6a998d11bb72e8b430f88a6943a5eac781c88ec Mon Sep 17 00:00:00 2001 From: J0WI Date: Wed, 8 Jul 2020 16:32:32 +0000 Subject: [PATCH 33/36] Upgrade to Alpine 3.12 (#27) --- tools/docker/core/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/docker/core/Dockerfile b/tools/docker/core/Dockerfile index 2afd148e7..a0dfb1c51 100644 --- a/tools/docker/core/Dockerfile +++ b/tools/docker/core/Dockerfile @@ -1,6 +1,6 @@ # Docker Arch (amd64, arm32v6, ...) ARG TARGET_ARCH -FROM ${TARGET_ARCH}/python:3.8-alpine3.11 +FROM ${TARGET_ARCH}/python:3.8-alpine3.12 # Qemu Arch (x86_64, arm, ...) ARG QEMU_ARCH From 1697d66ba72f29a8127f10850f6b43fd1cd74873 Mon Sep 17 00:00:00 2001 From: bdeweygit Date: Thu, 9 Jul 2020 12:47:38 -0400 Subject: [PATCH 34/36] Be more informative about reasons for using Docker (#28) People who are considering running Certbot with Docker are probably doing so because their webserver is to be run with Docker. These changes to the README should help them to understand that doing so will require knowledge of Docker volumes and that the architectural justification for running Certbot in a separate container is the "one service per container" best practice. --- tools/docker/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/docker/README.md b/tools/docker/README.md index 197b83b9a..f4b9c6de4 100644 --- a/tools/docker/README.md +++ b/tools/docker/README.md @@ -1,9 +1,9 @@ Running Certbot in Docker ========================= -Docker is an amazingly simple and quick way to obtain a certificate. However, this mode of operation is unable to install certificates or configure your webserver, because our installer plugins cannot reach your webserver from inside the Docker container. +Docker is an amazingly simple and quick way to obtain a certificate. However, this mode of operation is unable to install certificates automatically or configure your webserver, because our installer plugins cannot reach your webserver from inside the Docker container. -**Most users should install Certbot by following the installation instructions at https://certbot.eff.org/instructions. You should only use Docker if you are sure you know what you are doing and have a good reason to do so.** +**Most users should install Certbot by following the installation instructions at https://certbot.eff.org/instructions. You should only use Docker if you are sure you know what you are doing (you understand [volumes](https://docs.docker.com/storage/volumes/)) and have a good reason to do so, such as following the [one service per container rule](https://docs.docker.com/config/containers/multi-service_container/).** For more information, please read [Certbot - Running with Docker](https://certbot.eff.org/docs/install.html#running-with-docker). From 40a2a5b99f6dcf1e4d32a38b262cbfc2fa207f86 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 14 Jul 2020 17:17:36 -0700 Subject: [PATCH 35/36] Release version v1.6.0 --- tools/docker/core/README.md | 2 +- tools/docker/plugin/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/docker/core/README.md b/tools/docker/core/README.md index a1f667f18..0d8c87c07 100644 --- a/tools/docker/core/README.md +++ b/tools/docker/core/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-1.6.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.6.0)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v1.6.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.6.x)](https://travis-ci.com/certbot/certbot) This is the Docker repository for Certbot Core. diff --git a/tools/docker/plugin/README.md b/tools/docker/plugin/README.md index 354cee5bf..a97de7ad4 100644 --- a/tools/docker/plugin/README.md +++ b/tools/docker/plugin/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-1.6.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.6.0)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v1.6.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.6.x)](https://travis-ci.com/certbot/certbot) This is one of the Docker repository for the Certbot DNS plugins. From 5415fc201c2689308510900450d50bc4aa390131 Mon Sep 17 00:00:00 2001 From: Erica Portnoy Date: Tue, 4 Aug 2020 12:33:20 -0700 Subject: [PATCH 36/36] Release version v1.7.0 --- tools/docker/core/README.md | 2 +- tools/docker/plugin/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/docker/core/README.md b/tools/docker/core/README.md index 0d8c87c07..9267b8cc4 100644 --- a/tools/docker/core/README.md +++ b/tools/docker/core/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v1.6.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.6.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v1.7.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.7.x)](https://travis-ci.com/certbot/certbot) This is the Docker repository for Certbot Core. diff --git a/tools/docker/plugin/README.md b/tools/docker/plugin/README.md index a97de7ad4..446be8da8 100644 --- a/tools/docker/plugin/README.md +++ b/tools/docker/plugin/README.md @@ -1,5 +1,5 @@ # ![](https://certbot.eff.org/images/certbot-logo-1A.svg) -[![](https://img.shields.io/badge/current-v1.6.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.6.x)](https://travis-ci.com/certbot/certbot) +[![](https://img.shields.io/badge/current-v1.7.0-blue.svg)](https://github.com/certbot/certbot.git)   [![](https://travis-ci.com/certbot/certbot.svg?branch=1.7.x)](https://travis-ci.com/certbot/certbot) This is one of the Docker repository for the Certbot DNS plugins.