-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker images #25
Open
nils-wisiol
wants to merge
9
commits into
main
Choose a base branch
from
docker-images
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Docker images #25
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c7dd8da
Building and publishing dns-desec docker image
Cub0n 3ae9cb6
Create Dockerfile
Cub0n cbb73ff
Base image and version
Cub0n af1613c
Bump to certbot 2.2.0
Cub0n 1dff01c
Bump certbot; Link images
Cub0n 036ab31
Bump to certbot 2.6
nils-wisiol ed78efc
Run test matrix even if some jobs fail
nils-wisiol 1c9fcf0
Upgrading min certbot to 2.21, currently shipped by Ubuntu 22.04.2
nils-wisiol b26ee61
Adding latest certbot release to text matrix
nils-wisiol File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Docker Build and Publish | ||
|
||
on: | ||
push: | ||
# Publish semver tags as releases. | ||
tags: [ 'v*' ] # Push events to matching v*, i.e. v1.0, v1.0.1 | ||
|
||
env: | ||
# Use docker.io for Docker Hub if empty | ||
REGISTRY: ghcr.io | ||
# Base Image Version to use | ||
BASE_IMAGE_VERSION: v2.2.0 | ||
# Tag Version which triggered the build | ||
IMAGE_TAG: ${{ github.ref_name }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
cmd: | ||
- arch: arm32v6 | ||
platforms: linux/arm/v6 | ||
- arch: arm64v8 | ||
platforms: linux/arm64/v8 | ||
- arch: amd64 | ||
platforms: linux/amd64 | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
id-token: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Docker buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Log into registry ${{ env.REGISTRY }} | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
#- name: Login to Docker Hub | ||
# uses: docker/login-action@v2 | ||
# with: | ||
# username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
# password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Lower case repository name | ||
run: | | ||
echo "IMAGE_REPO=${REPO,,}" >>${GITHUB_ENV} | ||
env: | ||
REPO: '${{ github.repository }}' | ||
|
||
- name: Build and push Docker images | ||
id: build-and-push | ||
run: | | ||
docker buildx build . -f Dockerfile --platform ${{ matrix.cmd.platforms }} --push \ | ||
-t ${{ env.REGISTRY }}/${{ env.IMAGE_REPO }}:${{ matrix.cmd.arch }}-${{ env.IMAGE_TAG }} \ | ||
-t ${{ env.REGISTRY }}/${{ env.IMAGE_REPO }}:${{ matrix.cmd.arch }}-latest \ | ||
--build-arg FROM_IMAGE=certbot/certbot:${{ matrix.cmd.arch }}-${{ env.BASE_IMAGE_VERSION }} | ||
|
||
- name: Sleep for 30 seconds | ||
run: sleep 30s | ||
shell: bash | ||
|
||
- name: Link to latest tag | ||
id: link-tag | ||
run: | | ||
docker manifest create ${{ env.REGISTRY }}/${{ env.IMAGE_REPO }}:latest \ | ||
--amend ${{ env.REGISTRY }}/${{ env.IMAGE_REPO }}:amd64-latest \ | ||
--amend ${{ env.REGISTRY }}/${{ env.IMAGE_REPO }}:arm32v6-latest \ | ||
--amend ${{ env.REGISTRY }}/${{ env.IMAGE_REPO }}:arm64v8-latest | ||
docker manifest push ${{ env.REGISTRY }}/${{ env.IMAGE_REPO }}:latest | ||
Comment on lines
+77
to
+81
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are we assuming that |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
ARG FROM_IMAGE=certbot/certbot:amd64-v2.6.0 | ||
|
||
#Base | ||
FROM ${FROM_IMAGE} | ||
|
||
# Install the DNS plugin | ||
COPY . /app | ||
WORKDIR /app | ||
RUN set -ex && \ | ||
pip install -r requirements.txt && \ | ||
pip install . | ||
|
||
RUN rm -rf /app | ||
|
||
#RUN pip install certbot-dns-desec |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we assuming that
v*
tags are added in strongly increasing order? If not,-latest
should only be pushed onmain
branch.