Merge pull request #1837 from pi-hole/development

Set base image versions directly on FROM line
This commit is contained in:
Adam Warner
2025-06-06 20:33:21 +01:00
committed by GitHub
5 changed files with 18 additions and 15 deletions

2
.github/CODEOWNERS vendored
View File

@@ -2,4 +2,4 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
* @pi-hole/docker-maintainers"
* @pi-hole/docker-maintainers

View File

@@ -20,11 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [linux/amd64, linux/386, linux/arm/v6, linux/arm/v7, linux/arm64]
alpine_version: [3.19]
include:
- platform: linux/riscv64
alpine_version: edge
platform: [linux/amd64, linux/386, linux/arm/v6, linux/arm/v7, linux/arm64, linux/riscv64]
steps:
- name: Prepare name for digest up/download
@@ -80,8 +76,7 @@ jobs:
context: ./src/
platforms: ${{ matrix.platform }}
build-args: |
PIHOLE_DOCKER_TAG=${{ steps.meta.outputs.version }}
alpine_version=${{ matrix.alpine_version }}
PIHOLE_DOCKER_TAG=${{ steps.meta.outputs.version }}
FTL_BRANCH=${{ env.components_branch }}
CORE_BRANCH=${{ env.components_branch }}
WEB_BRANCH=${{ env.components_branch }}

View File

@@ -1,7 +1,16 @@
# syntax=docker/dockerfile:1
ARG FTL_SOURCE=remote
ARG alpine_version="3.21"
FROM alpine:${alpine_version} AS base
# Pull Stable images
FROM alpine:3.22 AS base-stable
FROM base-stable AS base-386
FROM base-stable AS base-amd64
FROM base-stable AS base-arm
FROM base-stable AS base-arm64
# Pull Edge images
FROM alpine:edge AS base-edge
FROM base-edge AS base-riscv64
# Use the base image for the current architecture
FROM base-${TARGETARCH} AS base
# https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
ARG TARGETPLATFORM
@@ -101,8 +110,7 @@ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then FTLARCH=amd64; \
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then FTLARCH=armv7; \
# Note for the future, "linux/arm6/v8" is not a valid value for TARGETPLATFORM, despite the CI platform name being that.
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then FTLARCH=arm64; \
# RISCV is currently not working on GHA, and so FTL is unavailable for this platform.
#elif [ "$TARGETPLATFORM" = "linux/riscv64" ]; then FTLARCH=riscv64; \
elif [ "$TARGETPLATFORM" = "linux/riscv64" ]; then FTLARCH=riscv64; \
else FTLARCH=amd64; fi \
&& echo "Arch: ${TARGETPLATFORM}, FTLARCH: ${FTLARCH}" \
&& if [ "${FTL_BRANCH}" = "master" ]; then URL="https://github.com/pi-hole/ftl/releases/latest/download"; else URL="https://ftl.pi-hole.net/${FTL_BRANCH}"; fi \

View File

@@ -1,5 +1,5 @@
ARG alpine_version="3.21"
ARG docker_version="28.0.0"
ARG alpine_version="3.22"
ARG docker_version="28.2.2"
FROM docker:${docker_version}-cli-alpine${alpine_version}

View File

@@ -1,5 +1,5 @@
pytest == 8.3.5
pytest-xdist == 3.6.1
pytest-xdist == 3.7.0
pytest-testinfra == 10.2.2
black == 25.1.0
pytest-clarity == 1.0.1