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 15, 2023
1 parent 7867e45 commit 240faf7
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 7 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build-debian-bookworm-image-base.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build Docker Debian Bookworm image

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

env:
IMAGE_ID: ghcr.io/romeroalx/base-pdns-ci-image/debian-bookworm-pdns-base
IMAGE_TAG: "master"
DEBIAN_RELEASE_NAME: "bookworm-slim"

jobs:
build-and-push-debian-image:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3

- name: Build image
run: |
docker build . --file Dockerfile --tag $IMAGE_ID:$IMAGE_TAG \
--build-arg IMAGE_TAG=$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 $IMAGE_ID:$IMAGE_TAG
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,27 @@ name: Build Docker Debian 11 image
on:
workflow_dispatch:
push:
branches: [image-debian-11]
schedule:
- cron: '0 23 * * *'

env:
IMAGE_ID: ghcr.io/powerdns/base-pdns-ci-image/debian-11-pdns-base
IMAGE_ID: ghcr.io/romeroalx/base-pdns-ci-image/debian-11-pdns-base
IMAGE_TAG: "master"
DEBIAN_RELEASE_NAME: "bullseye-slim"

jobs:
build-and-push-debian-image:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3

- name: Build image
run: docker build . --file Dockerfile --tag $IMAGE_ID:$IMAGE_TAG --build-arg DOCKER_GID=$(stat -c %g /var/run/docker.sock)
run: |
docker build . --file Dockerfile --tag $IMAGE_ID:$IMAGE_TAG \
--build-arg IMAGE_TAG=$DEBIAN_RELEASE_NAME
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
Expand Down
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 IMAGE_TAG
FROM 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 240faf7

Please sign in to comment.