mirror of
https://github.com/pi-hole/docker-pi-hole.git
synced 2025-12-20 10:28:36 +00:00
Merge pull request #1832 from LizenzFass78851/fix/docker-base-update
fix: docker base version detection for dependabot
This commit is contained in:
7
.github/workflows/build-and-publish.yml
vendored
7
.github/workflows/build-and-publish.yml
vendored
@@ -20,11 +20,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
platform: [linux/amd64, linux/386, linux/arm/v6, linux/arm/v7, linux/arm64]
|
platform: [linux/amd64, linux/386, linux/arm/v6, linux/arm/v7, linux/arm64, linux/riscv64]
|
||||||
alpine_version: [3.19]
|
|
||||||
include:
|
|
||||||
- platform: linux/riscv64
|
|
||||||
alpine_version: edge
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Prepare name for digest up/download
|
- name: Prepare name for digest up/download
|
||||||
@@ -81,7 +77,6 @@ jobs:
|
|||||||
platforms: ${{ matrix.platform }}
|
platforms: ${{ matrix.platform }}
|
||||||
build-args: |
|
build-args: |
|
||||||
PIHOLE_DOCKER_TAG=${{ steps.meta.outputs.version }}
|
PIHOLE_DOCKER_TAG=${{ steps.meta.outputs.version }}
|
||||||
alpine_version=${{ matrix.alpine_version }}
|
|
||||||
FTL_BRANCH=${{ env.components_branch }}
|
FTL_BRANCH=${{ env.components_branch }}
|
||||||
CORE_BRANCH=${{ env.components_branch }}
|
CORE_BRANCH=${{ env.components_branch }}
|
||||||
WEB_BRANCH=${{ env.components_branch }}
|
WEB_BRANCH=${{ env.components_branch }}
|
||||||
|
|||||||
@@ -1,7 +1,16 @@
|
|||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
ARG FTL_SOURCE=remote
|
ARG FTL_SOURCE=remote
|
||||||
ARG alpine_version="3.21"
|
# Pull Stable images
|
||||||
FROM alpine:${alpine_version} AS base
|
FROM alpine:3.21 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
|
# https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
|
||||||
|
|
||||||
ARG TARGETPLATFORM
|
ARG TARGETPLATFORM
|
||||||
@@ -101,8 +110,7 @@ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then FTLARCH=amd64; \
|
|||||||
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then FTLARCH=armv7; \
|
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.
|
# 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; \
|
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 \
|
else FTLARCH=amd64; fi \
|
||||||
&& echo "Arch: ${TARGETPLATFORM}, FTLARCH: ${FTLARCH}" \
|
&& 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 \
|
&& 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 \
|
||||||
|
|||||||
Reference in New Issue
Block a user