Skip to content

Commit

Permalink
add buiding base image for debian bookworm
Browse files Browse the repository at this point in the history
  • Loading branch information
romeroalx committed Nov 21, 2023
1 parent 2ebaf06 commit 80d5c30
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 38 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/build-debian-image-base.yaml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/build-debian-images.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build Debian images for PDNS CI

on:
workflow_dispatch:
push:
schedule:
- cron: '0 23 * * *'

env:
IMAGE_TAG: master

jobs:
build-and-push-debian-images:
strategy:
matrix:
include:
- image-id: debian-11-pdns-base
debian-release-name: bullseye-slim
- image-id: debian-bookworm-pdns-base
debian-release-name: bookworm-slim
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3

- name: Build image
run: |
docker build . --file Dockerfile \
--tag ghcr.io/${{ github.repository }}/${{ matrix.image-id }}:${{ env.IMAGE_TAG }} \
--build-arg DEBIAN_IMAGE_TAG=${{ matrix.debian-release-name }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push into Github Container Registry
run: |
docker push ghcr.io/${{ github.repository }}/${{ matrix.image-id }}:${{ env.IMAGE_TAG }}
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM debian:11
ARG DEBIAN_IMAGE_TAG
FROM debian:${DEBIAN_IMAGE_TAG}

ARG REPO_HOME=/home/runner
ARG REPO_BRANCH=master
Expand All @@ -19,8 +20,9 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -y install \
sudo git curl gnupg software-properties-common wget \
ca-certificates apt-utils build-essential vim \
iproute2 net-tools iputils-* ifupdown cmake acl \
npm time mariadb-client postgresql-client jq python
npm time mariadb-client postgresql-client jq python3

# Required for auth-backend gsqlite3 tests
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1

# Install Docker client from the official Docker repository
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ Based on Debian Bullseye.

Clones PDNS public repo (<https://github.com/PowerDNS/>), master branch, and install common packages into a debian container.

Initially, images will be built daily and will be published as private (access required).
Images are built daily and published with open access.

The image result of this process will be used by the PDNS public repo to run actions.

0 comments on commit 80d5c30

Please sign in to comment.