Skip to content

Commit

Permalink
[Maintenance] Switch to bookworm #2
Browse files Browse the repository at this point in the history
  • Loading branch information
GioF71 committed Jul 24, 2023
1 parent 1d6be56 commit 936bf26
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 14 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/docker-multi-arch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ jobs:
strategy:
fail-fast: false
matrix:
base: ["bullseye"]
base: ["bookworm"]

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Prepare for docker build
id: prepare
run: |
ref_type=${{ github.ref_type }}
echo "REF_TYPE: ["$ref_type"]"
Expand All @@ -35,13 +36,22 @@ jobs:
image_name=${{secrets.DOCKER_USERNAME}}/minidlna
declare -A base_image_from_matrix
base_image_from_matrix[sid]=debian:sid-slim
base_image_from_matrix[trixie]=debian:trixie-slim
base_image_from_matrix[bookworm]=debian:bookworm-slim
base_image_from_matrix[bullseye]=debian:bullseye-slim
declare -A mpd_versions
mpd_versions[sid]=1.3.2
mpd_versions[trixie]=1.3.2
mpd_versions[bookworm]=1.3.0
mpd_versions[bullseye]=1.3.0
declare -A special_tags
special_tags[bullseye]="${image_name}:stable,${image_name}:latest"
special_tags[sid]="${image_name}:unstable"
special_tags[trixie]="${image_name}:nextstable"
special_tags[bookworm]="${image_name}:stable,${image_name}:latest"
special_tags[bullseye]="${image_name}:oldstable
base_image=${base_image_from_matrix[${{ matrix.base }}]}
mpd_version=${mpd_versions[${{ matrix.base }}]}
Expand Down Expand Up @@ -96,8 +106,8 @@ jobs:
fi
fi
echo "Building tags: ["${tags}"]"
echo "RELEASE_TAGS=${tags}" >> $GITHUB_ENV
echo "BASE_IMAGE=${base_image}" >> $GITHUB_ENV
echo "RELEASE_TAGS=${tags}" >> $GITHUB_OUTPUT
echo "BASE_IMAGE=${base_image}" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand All @@ -119,7 +129,7 @@ jobs:
with:
context: .
build-args: |
BASE_IMAGE=${{ env.BASE_IMAGE }}
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
BASE_IMAGE=${{ steps.prepare.outputs.BASE_IMAGE }}
platforms: linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8
push: true
tags: ${{ env.RELEASE_TAGS }}
tags: ${{ steps.prepare.outputs.RELEASE_TAGS }}
19 changes: 13 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG IMAGE_TAG="${IMAGE_TAG:-bullseye}"
FROM debian:${IMAGE_TAG} AS base
ARG BASE_IMAGE
FROM ${BASE_IMAGE:-debian:stable-slim} AS BASE
ARG USE_APT_PROXY

RUN mkdir -p /app
Expand All @@ -9,16 +9,23 @@ RUN mkdir -p /app/doc
COPY app/conf/01-apt-proxy /app/conf/

RUN if [ "${USE_APT_PROXY}" = "Y" ]; then \
echo "Builind using apt proxy"; \
cp /app/conf/01-apt-proxy /etc/apt/apt.conf.d/01-apt-proxy; \
cat /etc/apt/apt.conf.d/01-apt-proxy; \
echo "Builind using apt proxy"; \
cp /app/conf/01-apt-proxy /etc/apt/apt.conf.d/01-apt-proxy; \
cat /etc/apt/apt.conf.d/01-apt-proxy; \
else \
echo "Building without apt proxy"; \
echo "Building without apt proxy"; \
fi

RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get upgrade -y
RUN apt-get install minidlna -y

RUN if [ "${USE_APT_PROXY}" = "Y" ]; then \
echo "Removing apt proxy configuration ..."; \
rm /etc/apt/apt.conf.d/01-apt-proxy; \
echo ". Done."; \
fi

RUN rm -rf /var/lib/apt/lists/*

COPY README.md /app/doc
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,5 @@ Just be careful to use the tag you have built.

Date|Major Changes
:---|:---
2023-07-24|Switch to bookworm, see [#2](https://github.com/GioF71/minidlna-docker/issues/2)
2022-10-23|Initial release
5 changes: 4 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@
declare -A base_images

base_images[sid]=debian:sid-slim
base_images[unstable]=debian:unstable-slim
base_images[stable]=debian:stable-slim
base_images[trixie]=debian:trixie-slim
base_images[bookworm]=debian:bookworm-slim
base_images[bullseye]=debian:bullseye-slim
base_images[buster]=debian:buster-slim
base_images[jammy]=ubuntu:jammy

DEFAULT_BASE_IMAGE=bullseye
DEFAULT_BASE_IMAGE=bookworm
DEFAULT_TAG=local
DEFAULT_USE_PROXY=N

Expand Down

0 comments on commit 936bf26

Please # to comment.