Docker: Add experimental Debian 12 "Bookworm" base images #2125
This commit is contained in:
parent
47eaf1faa2
commit
ea3a6e6e0a
20
Makefile
20
Makefile
@ -245,6 +245,14 @@ 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 pull --platform=amd64 debian:bookworm-slim
|
||||
docker pull --platform=arm64 debian:bookworm-slim
|
||||
scripts/docker/buildx-multi.sh develop linux/amd64,linux/arm64 bookworm /bookworm
|
||||
docker-develop-bookworm-slim:
|
||||
docker pull --platform=amd64 debian:bookworm-slim
|
||||
docker pull --platform=arm64 debian:bookworm-slim
|
||||
scripts/docker/buildx-multi.sh develop linux/amd64,linux/arm64 bookworm-slim /bookworm-slim
|
||||
docker-develop-armv7:
|
||||
docker pull --platform=arm debian:bullseye-slim
|
||||
scripts/docker/buildx.sh develop linux/arm armv7 /armv7
|
||||
@ -265,6 +273,12 @@ docker-preview-bullseye:
|
||||
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 pull --platform=amd64 photoprism/develop:bookworm
|
||||
docker pull --platform=amd64 photoprism/develop:bookworm-slim
|
||||
docker pull --platform=arm64 photoprism/develop:bookworm
|
||||
docker pull --platform=arm64 photoprism/develop:bookworm-slim
|
||||
scripts/docker/buildx-multi.sh photoprism linux/amd64,linux/arm64 preview /bookworm
|
||||
docker-preview-armv7:
|
||||
docker pull --platform=arm photoprism/develop:armv7
|
||||
docker pull --platform=arm debian:bullseye-slim
|
||||
@ -294,6 +308,12 @@ docker-release-bullseye:
|
||||
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 pull --platform=amd64 photoprism/develop:bookworm
|
||||
docker pull --platform=amd64 photoprism/develop:bookworm-slim
|
||||
docker pull --platform=arm64 photoprism/develop:bookworm
|
||||
docker pull --platform=arm64 photoprism/develop:bookworm-slim
|
||||
scripts/docker/buildx-multi.sh photoprism linux/amd64,linux/arm64 bookworm /bookworm
|
||||
docker-release-armv7:
|
||||
docker pull --platform=arm photoprism/develop:armv7
|
||||
docker pull --platform=arm debian:bullseye-slim
|
||||
|
80
docker/develop/bookworm-slim/Dockerfile
Normal file
80
docker/develop/bookworm-slim/Dockerfile
Normal file
@ -0,0 +1,80 @@
|
||||
#### Base Image: Debian 12, Codename "Bookworm"
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
LABEL maintainer="Michael Mayer <hello@photoprism.app>"
|
||||
|
||||
ARG TARGETARCH
|
||||
ARG BUILD_TAG
|
||||
|
||||
# set environment variables, see https://docs.photoprism.app/getting-started/config-options/
|
||||
ENV PHOTOPRISM_ARCH=$TARGETARCH \
|
||||
DOCKER_TAG=$BUILD_TAG \
|
||||
DOCKER_ENV="develop" \
|
||||
PATH="/usr/local/sbin:/usr/sbin:/usr/local/bin:/usr/bin:/scripts:/opt/photoprism/bin" \
|
||||
TMPDIR="/tmp" \
|
||||
DEBIAN_FRONTEND="noninteractive" \
|
||||
TF_CPP_MIN_LOG_LEVEL="2"
|
||||
|
||||
# copy scripts and debian backports sources list
|
||||
COPY --chown=root:root --chmod=755 /scripts/dist/* /scripts/
|
||||
COPY --chown=root:root --chmod=644 /docker/develop/bookworm/sources.list /etc/apt/sources.list.d/bookworm.list
|
||||
|
||||
# install additional distribution packages
|
||||
RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
||||
echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/80recommends && \
|
||||
echo 'APT::Install-Suggests "false";' > /etc/apt/apt.conf.d/80suggests && \
|
||||
echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/80forceyes && \
|
||||
echo 'APT::Get::Fix-Missing "true";' > /etc/apt/apt.conf.d/80fixmissing && \
|
||||
groupadd -f -r -g 44 video && \
|
||||
groupadd -f -r -g 109 render && \
|
||||
groupadd -f -g 1000 photoprism && \
|
||||
useradd -m -g 1000 -u 1000 -d /photoprism -G video,render photoprism && \
|
||||
chmod 777 /photoprism && \
|
||||
apt-get update && apt-get -qq dist-upgrade && apt-get -qq install --no-install-recommends \
|
||||
ca-certificates \
|
||||
jq \
|
||||
zip \
|
||||
gpg \
|
||||
lshw \
|
||||
wget \
|
||||
curl \
|
||||
make \
|
||||
sudo \
|
||||
bash \
|
||||
sqlite3 \
|
||||
tzdata \
|
||||
libc6 \
|
||||
libatomic1 \
|
||||
libheif-examples \
|
||||
librsvg2-bin \
|
||||
exiftool \
|
||||
darktable \
|
||||
rawtherapee \
|
||||
ffmpeg \
|
||||
ffmpegthumbnailer \
|
||||
libavcodec-extra \
|
||||
mariadb-client \
|
||||
&& \
|
||||
install -d -m 0777 -o 1000 -g 1000 \
|
||||
/var/lib/photoprism \
|
||||
/tmp/photoprism \
|
||||
/photoprism/originals \
|
||||
/photoprism/import \
|
||||
/photoprism/storage \
|
||||
/photoprism/storage/sidecar \
|
||||
/photoprism/storage/albums \
|
||||
/photoprism/storage/backups \
|
||||
/photoprism/storage/config \
|
||||
/photoprism/storage/cache \
|
||||
&& \
|
||||
echo "ALL ALL=(ALL) NOPASSWD:SETENV: /scripts/entrypoint-init.sh" >> /etc/sudoers.d/init && \
|
||||
/scripts/cleanup.sh
|
||||
|
||||
# define default directory and user
|
||||
WORKDIR /photoprism
|
||||
|
||||
# expose default http port 2342
|
||||
EXPOSE 2342
|
||||
|
||||
# keep container running
|
||||
CMD ["tail", "-f", "/dev/null"]
|
148
docker/develop/bookworm/Dockerfile
Normal file
148
docker/develop/bookworm/Dockerfile
Normal file
@ -0,0 +1,148 @@
|
||||
#### Base Image: Debian 12, Codename "Bookworm"
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
LABEL maintainer="Michael Mayer <hello@photoprism.app>"
|
||||
|
||||
ARG TARGETARCH
|
||||
ARG BUILD_TAG
|
||||
|
||||
# set environment variables
|
||||
ENV PHOTOPRISM_ARCH=$TARGETARCH \
|
||||
DOCKER_TAG=$BUILD_TAG \
|
||||
DOCKER_ENV="develop" \
|
||||
NODE_ENV="production" \
|
||||
DEBIAN_FRONTEND="noninteractive" \
|
||||
TMPDIR="/tmp" \
|
||||
LD_LIBRARY_PATH="/root/.local/lib:/usr/local/lib:/usr/lib" \
|
||||
TF_CPP_MIN_LOG_LEVEL="0" \
|
||||
GOPATH="/go" \
|
||||
GOBIN="/go/bin" \
|
||||
PATH="/usr/local/sbin:/usr/sbin:/usr/local/bin:/usr/bin:/scripts:/usr/local/go/bin:/go/bin" \
|
||||
GO111MODULE="on" \
|
||||
CGO_CFLAGS="-g -O2 -Wno-return-local-addr"
|
||||
|
||||
# copy scripts and debian backports sources list
|
||||
COPY --chown=root:root --chmod=755 /scripts/dist/* /scripts/
|
||||
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
|
||||
|
||||
# update image and install build dependencies
|
||||
RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
||||
echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/80recommends && \
|
||||
echo 'APT::Install-Suggests "false";' > /etc/apt/apt.conf.d/80suggests && \
|
||||
echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/80forceyes && \
|
||||
echo 'APT::Get::Fix-Missing "true";' > /etc/apt/apt.conf.d/80fixmissing && \
|
||||
groupadd -f -r -g 44 video && \
|
||||
groupadd -f -r -g 109 render && \
|
||||
groupadd -f -g 1000 photoprism && \
|
||||
useradd -m -g 1000 -u 1000 -d /photoprism -G video,render photoprism && \
|
||||
chmod 777 /photoprism && \
|
||||
apt-get update && apt-get -qq dist-upgrade && apt-get -qq install --no-install-recommends \
|
||||
apt-utils \
|
||||
gpg \
|
||||
pkg-config \
|
||||
software-properties-common \
|
||||
ca-certificates \
|
||||
build-essential \
|
||||
gcc \
|
||||
g++ \
|
||||
sudo \
|
||||
bash \
|
||||
make \
|
||||
nano \
|
||||
lsof \
|
||||
lshw \
|
||||
wget \
|
||||
curl \
|
||||
rsync \
|
||||
jq \
|
||||
git \
|
||||
zip \
|
||||
unzip \
|
||||
gettext \
|
||||
chromium \
|
||||
chromium-driver \
|
||||
chromium-sandbox \
|
||||
firefox-esr \
|
||||
sqlite3 \
|
||||
libc6-dev \
|
||||
libssl-dev \
|
||||
libxft-dev \
|
||||
libhdf5-serial-dev \
|
||||
libpng-dev \
|
||||
libheif-examples \
|
||||
librsvg2-bin \
|
||||
libzmq3-dev \
|
||||
libx264-dev \
|
||||
libx265-dev \
|
||||
libnss3 \
|
||||
libfreetype6 \
|
||||
libfreetype6-dev \
|
||||
libfontconfig1 \
|
||||
libfontconfig1-dev \
|
||||
fonts-roboto \
|
||||
tzdata \
|
||||
exiftool \
|
||||
rawtherapee \
|
||||
ffmpeg \
|
||||
darktable \
|
||||
ffmpegthumbnailer \
|
||||
libavcodec-extra \
|
||||
davfs2 \
|
||||
chrpath \
|
||||
apache2-utils \
|
||||
mariadb-client \
|
||||
&& \
|
||||
/scripts/install-nodejs.sh && \
|
||||
/scripts/install-tensorflow.sh && \
|
||||
/scripts/install-go.sh && \
|
||||
/scripts/cleanup.sh && \
|
||||
mkdir -p "/go/src" "/go/bin" && \
|
||||
chmod -R 777 "/go" && \
|
||||
install -d -m 0777 -o 1000 -g 1000 \
|
||||
/var/lib/photoprism \
|
||||
/tmp/photoprism \
|
||||
/photoprism/originals \
|
||||
/photoprism/import \
|
||||
/photoprism/storage \
|
||||
/photoprism/storage/sidecar \
|
||||
/photoprism/storage/albums \
|
||||
/photoprism/storage/backups \
|
||||
/photoprism/storage/config \
|
||||
/photoprism/storage/cache \
|
||||
&& \
|
||||
wget "https://dl.photoprism.app/tensorflow/nsfw.zip?${BUILD_TAG}" -O /tmp/photoprism/nsfw.zip && \
|
||||
wget "https://dl.photoprism.app/tensorflow/nasnet.zip?${BUILD_TAG}" -O /tmp/photoprism/nasnet.zip && \
|
||||
wget "https://dl.photoprism.app/tensorflow/facenet.zip?${BUILD_TAG}" -O /tmp/photoprism/facenet.zip && \
|
||||
wget "https://dl.photoprism.app/qa/testdata.zip?${BUILD_TAG}" -O /tmp/photoprism/testdata.zip
|
||||
|
||||
# install Go tools
|
||||
RUN /usr/local/go/bin/go install github.com/tianon/gosu@latest && \
|
||||
/usr/local/go/bin/go install golang.org/x/tools/cmd/goimports@latest && \
|
||||
/usr/local/go/bin/go install github.com/kyoh86/richgo@latest && \
|
||||
/usr/local/go/bin/go install github.com/psampaz/go-mod-outdated@latest && \
|
||||
/usr/local/go/bin/go install github.com/dsoprea/go-exif/v3/command/exif-read-tool@latest; \
|
||||
cp /go/bin/gosu /sbin/gosu && \
|
||||
chown root:root /sbin/gosu && \
|
||||
chmod 755 /sbin/gosu && \
|
||||
echo "alias go=richgo ll='ls -alh'" > /photoprism/.bash_aliases && \
|
||||
echo "alias go=richgo ll='ls -alh'" > /root/.bash_aliases && \
|
||||
echo "ALL ALL=(ALL) NOPASSWD:SETENV: ALL" >> /etc/sudoers.d/all && \
|
||||
cp /scripts/heif-convert.sh /usr/local/bin/heif-convert && \
|
||||
chmod -R a+rwX /go
|
||||
|
||||
# set up project directory
|
||||
WORKDIR "/go/src/github.com/photoprism/photoprism"
|
||||
|
||||
# expose the following container ports:
|
||||
# - 2342 (HTTP)
|
||||
# - 2343 (Acceptance Tests)
|
||||
# - 9515 (Chromedriver)
|
||||
# - 40000 (Go Debugger)
|
||||
EXPOSE 2342 2343 9515 40000
|
||||
|
||||
# set container entrypoint script
|
||||
ENTRYPOINT ["/scripts/entrypoint.sh"]
|
||||
|
||||
# keep container running
|
||||
CMD ["tail", "-f", "/dev/null"]
|
4
docker/develop/bookworm/sources.list
Normal file
4
docker/develop/bookworm/sources.list
Normal file
@ -0,0 +1,4 @@
|
||||
deb http://ftp.de.debian.org/debian testing contrib non-free
|
||||
deb http://ftp.de.debian.org/debian testing-updates contrib non-free
|
||||
deb http://ftp.de.debian.org/debian testing-backports main contrib non-free
|
||||
deb http://security.debian.org/debian-security testing-security contrib non-free
|
101
docker/photoprism/bookworm/Dockerfile
Normal file
101
docker/photoprism/bookworm/Dockerfile
Normal file
@ -0,0 +1,101 @@
|
||||
##################################################### BUILD STAGE ######################################################
|
||||
FROM photoprism/develop:bookworm as build
|
||||
|
||||
ARG TARGETARCH
|
||||
ARG BUILD_TAG
|
||||
|
||||
# set up project directory
|
||||
WORKDIR "/go/src/github.com/photoprism/photoprism"
|
||||
COPY . .
|
||||
|
||||
# build and install dist files for prod env
|
||||
RUN make all install DESTDIR=/opt/photoprism
|
||||
|
||||
################################################## PRODUCTION STAGE ####################################################
|
||||
#### Base Image: Debian 12, Codename "Bookworm"
|
||||
FROM photoprism/develop:bookworm-slim
|
||||
|
||||
LABEL maintainer="Michael Mayer <hello@photoprism.app>"
|
||||
|
||||
ARG TARGETARCH
|
||||
ARG BUILD_TAG
|
||||
|
||||
# set environment variables, see https://docs.photoprism.app/getting-started/config-options/
|
||||
ENV PHOTOPRISM_ARCH=$TARGETARCH \
|
||||
DOCKER_TAG=$BUILD_TAG \
|
||||
DOCKER_ENV="prod" \
|
||||
PATH="/usr/local/sbin:/usr/sbin:/usr/local/bin:/usr/bin:/scripts:/opt/photoprism/bi" \
|
||||
TMPDIR="/tmp" \
|
||||
DEBIAN_FRONTEND="noninteractive" \
|
||||
TF_CPP_MIN_LOG_LEVEL="2" \
|
||||
PHOTOPRISM_ASSETS_PATH="/opt/photoprism/assets" \
|
||||
PHOTOPRISM_IMPORT_PATH="/photoprism/import" \
|
||||
PHOTOPRISM_ORIGINALS_PATH="/photoprism/originals" \
|
||||
PHOTOPRISM_STORAGE_PATH="/photoprism/storage" \
|
||||
PHOTOPRISM_BACKUP_PATH="/photoprism/storage/backups" \
|
||||
PHOTOPRISM_LOG_FILENAME="/photoprism/storage/photoprism.log" \
|
||||
PHOTOPRISM_PID_FILENAME="/photoprism/storage/photoprism.pid" \
|
||||
PHOTOPRISM_DEBUG="false" \
|
||||
PHOTOPRISM_PUBLIC="false" \
|
||||
PHOTOPRISM_READONLY="false" \
|
||||
PHOTOPRISM_UPLOAD_NSFW="true" \
|
||||
PHOTOPRISM_DETECT_NSFW="false" \
|
||||
PHOTOPRISM_EXPERIMENTAL="false" \
|
||||
PHOTOPRISM_SITE_URL="http://localhost:2342/" \
|
||||
PHOTOPRISM_SITE_TITLE="PhotoPrism" \
|
||||
PHOTOPRISM_SITE_CAPTION="AI-Powered Photos App" \
|
||||
PHOTOPRISM_SITE_DESCRIPTION="" \
|
||||
PHOTOPRISM_SITE_AUTHOR="" \
|
||||
PHOTOPRISM_HTTP_HOST="0.0.0.0" \
|
||||
PHOTOPRISM_HTTP_PORT=2342 \
|
||||
PHOTOPRISM_DATABASE_DRIVER="sqlite" \
|
||||
PHOTOPRISM_DATABASE_SERVER="" \
|
||||
PHOTOPRISM_DATABASE_NAME="photoprism" \
|
||||
PHOTOPRISM_DATABASE_USER="photoprism" \
|
||||
PHOTOPRISM_DATABASE_PASSWORD="" \
|
||||
PHOTOPRISM_DISABLE_CHOWN="false" \
|
||||
PHOTOPRISM_DISABLE_WEBDAV="false" \
|
||||
PHOTOPRISM_DISABLE_SETTINGS="false" \
|
||||
PHOTOPRISM_DISABLE_BACKUPS="false" \
|
||||
PHOTOPRISM_DISABLE_EXIFTOOL="false" \
|
||||
PHOTOPRISM_DISABLE_PLACES="false" \
|
||||
PHOTOPRISM_DISABLE_TENSORFLOW="false" \
|
||||
PHOTOPRISM_DISABLE_FACES="false" \
|
||||
PHOTOPRISM_DISABLE_CLASSIFICATION="false" \
|
||||
PHOTOPRISM_DARKTABLE_PRESETS="false" \
|
||||
PHOTOPRISM_THUMB_FILTER="lanczos" \
|
||||
PHOTOPRISM_THUMB_UNCACHED="false" \
|
||||
PHOTOPRISM_THUMB_SIZE=2048 \
|
||||
PHOTOPRISM_THUMB_SIZE_UNCACHED=7680 \
|
||||
PHOTOPRISM_JPEG_SIZE=7680 \
|
||||
PHOTOPRISM_JPEG_QUALITY=92 \
|
||||
PHOTOPRISM_WORKERS=0 \
|
||||
PHOTOPRISM_WAKEUP_INTERVAL=900 \
|
||||
PHOTOPRISM_AUTO_INDEX=300 \
|
||||
PHOTOPRISM_AUTO_IMPORT=300
|
||||
|
||||
# copy scripts
|
||||
COPY --chown=root:root --chmod=755 /scripts/dist/* /scripts/
|
||||
|
||||
# update pre-installed packages if needed
|
||||
RUN apt-get update && \
|
||||
apt-get -qq dist-upgrade && \
|
||||
/scripts/cleanup.sh
|
||||
|
||||
# define default directory and user
|
||||
WORKDIR /photoprism
|
||||
|
||||
# expose default http port 2342
|
||||
EXPOSE 2342
|
||||
|
||||
# copy dist files
|
||||
COPY --from=build /opt/photoprism/ /opt/photoprism
|
||||
RUN mv /opt/photoprism/sbin/gosu /sbin/gosu && \
|
||||
chown root:root /sbin/gosu && \
|
||||
chmod 755 /sbin/gosu
|
||||
|
||||
# set container entrypoint script
|
||||
ENTRYPOINT ["/scripts/entrypoint.sh"]
|
||||
|
||||
# start app server
|
||||
CMD ["/opt/photoprism/bin/photoprism", "start"]
|
Loading…
x
Reference in New Issue
Block a user