Docker: Upgrade ARMv7 base image to Debian 12 "Bookworm" #2178

This commit is contained in:
Michael Mayer 2022-03-23 13:39:45 +01:00
parent fdf3d26277
commit 7f943d2f3f
3 changed files with 34 additions and 34 deletions

View file

@ -235,24 +235,24 @@ test-coverage:
$(info Running all Go unit tests with code coverage report...) $(info Running all Go unit tests with code coverage report...)
go test -parallel 1 -count 1 -cpu 1 -failfast -tags slow -timeout 30m -coverprofile coverage.txt -covermode atomic ./pkg/... ./internal/... go test -parallel 1 -count 1 -cpu 1 -failfast -tags slow -timeout 30m -coverprofile coverage.txt -covermode atomic ./pkg/... ./internal/...
go tool cover -html=coverage.txt -o coverage.html go tool cover -html=coverage.txt -o coverage.html
docker-develop: docker-develop-bullseye docker-develop-bullseye-slim docker-develop-armv7 docker-develop: docker-develop-bookworm docker-develop-bookworm-slim docker-develop-armv7
docker-develop-all: docker-develop docker-develop-buster docker-develop-impish docker-develop-all: docker-develop docker-develop-bullseye docker-develop-bullseye-slim docker-develop-buster docker-develop-impish
docker-develop-bullseye:
docker pull --platform=amd64 golang:1.18-bullseye
docker pull --platform=arm64 golang:1.18-bullseye
scripts/docker/buildx-multi.sh develop linux/amd64,linux/arm64 bullseye /bullseye "-t photoprism/develop:latest"
docker-develop-bullseye-slim:
docker pull --platform=amd64 debian:bullseye-slim
docker pull --platform=arm64 debian:bullseye-slim
scripts/docker/buildx-multi.sh develop linux/amd64,linux/arm64 bullseye-slim /bullseye-slim
docker-develop-bookworm: docker-develop-bookworm:
docker pull --platform=amd64 debian:bookworm-slim docker pull --platform=amd64 debian:bookworm-slim
docker pull --platform=arm64 debian:bookworm-slim docker pull --platform=arm64 debian:bookworm-slim
scripts/docker/buildx-multi.sh develop linux/amd64,linux/arm64 bookworm /bookworm scripts/docker/buildx-multi.sh develop linux/amd64,linux/arm64 bookworm /bookworm "-t photoprism/develop:latest"
docker-develop-bookworm-slim: docker-develop-bookworm-slim:
docker pull --platform=amd64 debian:bookworm-slim docker pull --platform=amd64 debian:bookworm-slim
docker pull --platform=arm64 debian:bookworm-slim docker pull --platform=arm64 debian:bookworm-slim
scripts/docker/buildx-multi.sh develop linux/amd64,linux/arm64 bookworm-slim /bookworm-slim scripts/docker/buildx-multi.sh develop linux/amd64,linux/arm64 bookworm-slim /bookworm-slim
docker-develop-bullseye:
docker pull --platform=amd64 golang:1.18-bullseye
docker pull --platform=arm64 golang:1.18-bullseye
scripts/docker/buildx-multi.sh develop linux/amd64,linux/arm64 bullseye /bullseye
docker-develop-bullseye-slim:
docker pull --platform=amd64 debian:bullseye-slim
docker pull --platform=arm64 debian:bullseye-slim
scripts/docker/buildx-multi.sh develop linux/amd64,linux/arm64 bullseye-slim /bullseye-slim
docker-develop-armv7: docker-develop-armv7:
docker pull --platform=arm debian:bullseye-slim docker pull --platform=arm debian:bullseye-slim
scripts/docker/buildx.sh develop linux/arm armv7 /armv7 scripts/docker/buildx.sh develop linux/arm armv7 /armv7
@ -264,21 +264,21 @@ docker-develop-impish:
docker pull --platform=amd64 ubuntu:impish docker pull --platform=amd64 ubuntu:impish
docker pull --platform=arm64 ubuntu:impish docker pull --platform=arm64 ubuntu:impish
scripts/docker/buildx-multi.sh develop linux/amd64,linux/arm64 impish /impish scripts/docker/buildx-multi.sh develop linux/amd64,linux/arm64 impish /impish
docker-preview: docker-preview-bullseye docker-preview: docker-preview-bookworm
docker-preview-all: docker-preview docker-preview-buster docker-preview-impish docker-preview-all: docker-preview docker-preview-bullseye docker-preview-buster docker-preview-impish
docker-preview-arm: docker-preview-arm64 docker-preview-armv7 docker-preview-arm: docker-preview-arm64 docker-preview-armv7
docker-preview-bullseye:
docker pull --platform=amd64 photoprism/develop:bullseye
docker pull --platform=amd64 photoprism/develop:bullseye-slim
docker pull --platform=arm64 photoprism/develop:bullseye
docker pull --platform=arm64 photoprism/develop:bullseye-slim
scripts/docker/buildx-multi.sh photoprism linux/amd64,linux/arm64 preview /bullseye
docker-preview-bookworm: docker-preview-bookworm:
docker pull --platform=amd64 photoprism/develop:bookworm docker pull --platform=amd64 photoprism/develop:bookworm
docker pull --platform=amd64 photoprism/develop:bookworm-slim docker pull --platform=amd64 photoprism/develop:bookworm-slim
docker pull --platform=arm64 photoprism/develop:bookworm docker pull --platform=arm64 photoprism/develop:bookworm
docker pull --platform=arm64 photoprism/develop:bookworm-slim docker pull --platform=arm64 photoprism/develop:bookworm-slim
scripts/docker/buildx-multi.sh photoprism linux/amd64,linux/arm64 preview /bookworm scripts/docker/buildx-multi.sh photoprism linux/amd64,linux/arm64 preview /bookworm
docker-preview-bullseye:
docker pull --platform=amd64 photoprism/develop:bullseye
docker pull --platform=amd64 photoprism/develop:bullseye-slim
docker pull --platform=arm64 photoprism/develop:bullseye
docker pull --platform=arm64 photoprism/develop:bullseye-slim
scripts/docker/buildx-multi.sh photoprism linux/amd64,linux/arm64 preview-bullseye /bullseye
docker-preview-armv7: docker-preview-armv7:
docker pull --platform=arm photoprism/develop:armv7 docker pull --platform=arm photoprism/develop:armv7
docker pull --platform=arm debian:bullseye-slim docker pull --platform=arm debian:bullseye-slim
@ -299,21 +299,21 @@ docker-preview-impish:
docker pull --platform=amd64 ubuntu:impish docker pull --platform=amd64 ubuntu:impish
docker pull --platform=arm64 ubuntu:impish docker pull --platform=arm64 ubuntu:impish
scripts/docker/buildx-multi.sh photoprism linux/amd64,linux/arm64 preview-impish /impish scripts/docker/buildx-multi.sh photoprism linux/amd64,linux/arm64 preview-impish /impish
docker-release: docker-release-bullseye docker-release: docker-release-bookworm
docker-release-all: docker-release docker-release-buster docker-release-impish docker-release-all: docker-release docker-release-bullseye docker-release-buster docker-release-impish
docker-release-arm: docker-release-arm64 docker-release-armv7 docker-release-arm: docker-release-arm64 docker-release-armv7
docker-release-bullseye:
docker pull --platform=amd64 photoprism/develop:bullseye
docker pull --platform=amd64 photoprism/develop:bullseye-slim
docker pull --platform=arm64 photoprism/develop:bullseye
docker pull --platform=arm64 photoprism/develop:bullseye-slim
scripts/docker/buildx-multi.sh photoprism linux/amd64,linux/arm64 bullseye /bullseye "-t photoprism/photoprism:latest"
docker-release-bookworm: docker-release-bookworm:
docker pull --platform=amd64 photoprism/develop:bookworm docker pull --platform=amd64 photoprism/develop:bookworm
docker pull --platform=amd64 photoprism/develop:bookworm-slim docker pull --platform=amd64 photoprism/develop:bookworm-slim
docker pull --platform=arm64 photoprism/develop:bookworm docker pull --platform=arm64 photoprism/develop:bookworm
docker pull --platform=arm64 photoprism/develop:bookworm-slim docker pull --platform=arm64 photoprism/develop:bookworm-slim
scripts/docker/buildx-multi.sh photoprism linux/amd64,linux/arm64 bookworm /bookworm scripts/docker/buildx-multi.sh photoprism linux/amd64,linux/arm64 bookworm /bookworm "-t photoprism/photoprism:latest"
docker-release-bullseye:
docker pull --platform=amd64 photoprism/develop:bullseye
docker pull --platform=amd64 photoprism/develop:bullseye-slim
docker pull --platform=arm64 photoprism/develop:bullseye
docker pull --platform=arm64 photoprism/develop:bullseye-slim
scripts/docker/buildx-multi.sh photoprism linux/amd64,linux/arm64 bullseye /bullseye
docker-release-armv7: docker-release-armv7:
docker pull --platform=arm photoprism/develop:armv7 docker pull --platform=arm photoprism/develop:armv7
docker pull --platform=arm debian:bullseye-slim docker pull --platform=arm debian:bullseye-slim

View file

@ -1,5 +1,5 @@
#### Base Image: Debian 11, Codename "Bullseye" #### Base Image: Debian 12, Codename "Bookworm"
FROM debian:bullseye-slim FROM debian:bookworm-slim
LABEL maintainer="Michael Mayer <hello@photoprism.app>" LABEL maintainer="Michael Mayer <hello@photoprism.app>"
@ -23,7 +23,7 @@ ENV PHOTOPRISM_ARCH=$TARGETARCH \
# copy scripts and debian backports sources list # copy scripts and debian backports sources list
COPY --chown=root:root --chmod=755 /scripts/dist/* /scripts/ COPY --chown=root:root --chmod=755 /scripts/dist/* /scripts/
COPY --chown=root:root --chmod=644 /docker/develop/bullseye/sources.list /etc/apt/sources.list.d/bullseye.list COPY --chown=root:root --chmod=644 /docker/develop/bookworm/sources.list /etc/apt/sources.list.d/bookworm.list
COPY --chown=root:root --chmod=644 /.my.cnf /etc/my.cnf COPY --chown=root:root --chmod=644 /.my.cnf /etc/my.cnf
# update image and install build dependencies # update image and install build dependencies

View file

@ -12,8 +12,8 @@ COPY . .
RUN make all install DESTDIR=/opt/photoprism RUN make all install DESTDIR=/opt/photoprism
################################################## PRODUCTION STAGE #################################################### ################################################## PRODUCTION STAGE ####################################################
#### Base Image: Debian 11, Codename "Bullseye" #### Base Image: Debian 12, Codename "Bookworm"
FROM debian:bullseye-slim FROM debian:bookworm-slim
LABEL maintainer="Michael Mayer <hello@photoprism.app>" LABEL maintainer="Michael Mayer <hello@photoprism.app>"
@ -77,7 +77,7 @@ ENV PHOTOPRISM_ARCH=$TARGETARCH \
# copy dist files, scripts, and debian backports sources list # copy dist files, scripts, and debian backports sources list
COPY --from=build /opt/photoprism/ /opt/photoprism COPY --from=build /opt/photoprism/ /opt/photoprism
COPY --chown=root:root --chmod=755 /scripts/dist/* /scripts/ COPY --chown=root:root --chmod=755 /scripts/dist/* /scripts/
COPY /docker/develop/bullseye/sources.list /etc/apt/sources.list.d/bullseye.list COPY /docker/develop/bookworm/sources.list /etc/apt/sources.list.d/bookworm.list
# install additional distribution packages # install additional distribution packages
RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \