From ae2375ea09969291a1e523c7b2557cab3f2e2944 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Fri, 2 Sep 2022 15:45:09 +0200 Subject: [PATCH] Build: Update Dockerfiles Signed-off-by: Michael Mayer --- Dockerfile | 2 +- docker/develop/armv7/Dockerfile | 6 ++-- docker/develop/bookworm-slim/Dockerfile | 6 ++-- docker/develop/bookworm/Dockerfile | 6 ++-- docker/develop/bullseye-slim/Dockerfile | 6 ++-- docker/develop/bullseye/Dockerfile | 6 ++-- docker/develop/buster/Dockerfile | 6 ++-- docker/develop/impish/Dockerfile | 6 ++-- docker/develop/jammy-slim/Dockerfile | 2 +- docker/develop/jammy/Dockerfile | 2 +- docker/photoprism/armv7/Dockerfile | 37 +++++++++++++++++-------- docker/photoprism/bookworm/Dockerfile | 37 ++++++++++++++++++------- docker/photoprism/bullseye/Dockerfile | 37 ++++++++++++++++++------- docker/photoprism/buster/Dockerfile | 37 +++++++++++++++++-------- docker/photoprism/impish/Dockerfile | 37 +++++++++++++++++-------- docker/photoprism/jammy/Dockerfile | 6 ++-- 16 files changed, 159 insertions(+), 80 deletions(-) diff --git a/Dockerfile b/Dockerfile index e624dff0c..70107cdfe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,6 @@ FROM photoprism/develop:220902-jammy # Set default working directory. WORKDIR "/go/src/github.com/photoprism/photoprism" -# Add source to image. +# Copy source to image. COPY . . COPY --chown=root:root /scripts/dist/* /scripts/ \ No newline at end of file diff --git a/docker/develop/armv7/Dockerfile b/docker/develop/armv7/Dockerfile index 959a7de02..a39f8b5fa 100644 --- a/docker/develop/armv7/Dockerfile +++ b/docker/develop/armv7/Dockerfile @@ -1,4 +1,4 @@ -#### Base Image: Debian 12, Codename 'Bookworm' +#### Base Image: Debian 12 (Bookworm) FROM debian:bookworm-slim # Copyright © 2018 - 2022 PhotoPrism UG. All rights reserved. @@ -8,8 +8,8 @@ FROM debian:bookworm-slim # Add Open Container Initiative (OCI) annotations. # See: https://github.com/opencontainers/image-spec/blob/main/annotations.md -LABEL org.opencontainers.image.title="PhotoPrism Develop (ARMv7)" -LABEL org.opencontainers.image.description="Debian 12, Codename 'Bookworm'" +LABEL org.opencontainers.image.title="PhotoPrism® Dev (ARMv7)" +LABEL org.opencontainers.image.description="Debian 12 (Bookworm)" LABEL org.opencontainers.image.url="https://hub.docker.com/repository/docker/photoprism/develop" LABEL org.opencontainers.image.source="https://github.com/photoprism/photoprism" LABEL org.opencontainers.image.documentation="https://docs.photoprism.app/developer-guide/setup/" diff --git a/docker/develop/bookworm-slim/Dockerfile b/docker/develop/bookworm-slim/Dockerfile index 275201990..40088d8ea 100644 --- a/docker/develop/bookworm-slim/Dockerfile +++ b/docker/develop/bookworm-slim/Dockerfile @@ -1,4 +1,4 @@ -#### Base Image: Debian 12, Codename 'Bookworm' +#### Base Image: Debian 12 (Bookworm) FROM debian:bookworm-slim # Copyright © 2018 - 2022 PhotoPrism UG. All rights reserved. @@ -8,8 +8,8 @@ FROM debian:bookworm-slim # Add Open Container Initiative (OCI) annotations. # See: https://github.com/opencontainers/image-spec/blob/main/annotations.md -LABEL org.opencontainers.image.title="PhotoPrism Base Image (Debian 12)" -LABEL org.opencontainers.image.description="Debian 12, Codename 'Bookworm'" +LABEL org.opencontainers.image.title="PhotoPrism® Base Image (Debian 12)" +LABEL org.opencontainers.image.description="Debian 12 (Bookworm)" LABEL org.opencontainers.image.url="https://hub.docker.com/repository/docker/photoprism/develop" LABEL org.opencontainers.image.source="https://github.com/photoprism/photoprism" LABEL org.opencontainers.image.documentation="https://docs.photoprism.app/developer-guide/setup/" diff --git a/docker/develop/bookworm/Dockerfile b/docker/develop/bookworm/Dockerfile index 4f1b9dc9a..ac6d6d1b2 100644 --- a/docker/develop/bookworm/Dockerfile +++ b/docker/develop/bookworm/Dockerfile @@ -1,4 +1,4 @@ -#### Base Image: Debian 12, Codename 'Bookworm' +#### Base Image: Debian 12 (Bookworm) FROM debian:bookworm-slim # Copyright © 2018 - 2022 PhotoPrism UG. All rights reserved. @@ -8,8 +8,8 @@ FROM debian:bookworm-slim # Add Open Container Initiative (OCI) annotations. # See: https://github.com/opencontainers/image-spec/blob/main/annotations.md -LABEL org.opencontainers.image.title="PhotoPrism Develop (Debian 12)" -LABEL org.opencontainers.image.description="Debian 12, Codename 'Bookworm'" +LABEL org.opencontainers.image.title="PhotoPrism® Dev (Debian 12)" +LABEL org.opencontainers.image.description="Debian 12 (Bookworm)" LABEL org.opencontainers.image.url="https://hub.docker.com/repository/docker/photoprism/develop" LABEL org.opencontainers.image.source="https://github.com/photoprism/photoprism" LABEL org.opencontainers.image.documentation="https://docs.photoprism.app/developer-guide/setup/" diff --git a/docker/develop/bullseye-slim/Dockerfile b/docker/develop/bullseye-slim/Dockerfile index d1ceee92d..3e0a169d1 100644 --- a/docker/develop/bullseye-slim/Dockerfile +++ b/docker/develop/bullseye-slim/Dockerfile @@ -1,4 +1,4 @@ -#### Base Image: Debian 11, Codename 'Bullseye' +#### Base Image: Debian 11 (Bullseye) FROM debian:bullseye-slim # Copyright © 2018 - 2022 PhotoPrism UG. All rights reserved. @@ -8,8 +8,8 @@ FROM debian:bullseye-slim # Add Open Container Initiative (OCI) annotations. # See: https://github.com/opencontainers/image-spec/blob/main/annotations.md -LABEL org.opencontainers.image.title="PhotoPrism Base Image (Debian 11)" -LABEL org.opencontainers.image.description="Debian 11, Codename 'Bullseye'" +LABEL org.opencontainers.image.title="PhotoPrism® Base Image (Debian 11)" +LABEL org.opencontainers.image.description="Debian 11 (Bullseye)" LABEL org.opencontainers.image.url="https://hub.docker.com/repository/docker/photoprism/develop" LABEL org.opencontainers.image.source="https://github.com/photoprism/photoprism" LABEL org.opencontainers.image.documentation="https://docs.photoprism.app/developer-guide/setup/" diff --git a/docker/develop/bullseye/Dockerfile b/docker/develop/bullseye/Dockerfile index aa251e9e9..133ad7eac 100644 --- a/docker/develop/bullseye/Dockerfile +++ b/docker/develop/bullseye/Dockerfile @@ -1,4 +1,4 @@ -#### Base Image: Debian 11, Codename 'Bullseye' +#### Base Image: Debian 11 (Bullseye) FROM golang:1-bullseye # Copyright © 2018 - 2022 PhotoPrism UG. All rights reserved. @@ -8,8 +8,8 @@ FROM golang:1-bullseye # Add Open Container Initiative (OCI) annotations. # See: https://github.com/opencontainers/image-spec/blob/main/annotations.md -LABEL org.opencontainers.image.title="PhotoPrism Build Environment" -LABEL org.opencontainers.image.description="Debian 11, Codename 'Bullseye'" +LABEL org.opencontainers.image.title="PhotoPrism® Dev (Debian 11)" +LABEL org.opencontainers.image.description="Debian 11 (Bullseye)" LABEL org.opencontainers.image.url="https://hub.docker.com/repository/docker/photoprism/develop" LABEL org.opencontainers.image.source="https://github.com/photoprism/photoprism" LABEL org.opencontainers.image.documentation="https://docs.photoprism.app/developer-guide/setup/" diff --git a/docker/develop/buster/Dockerfile b/docker/develop/buster/Dockerfile index 80f3e90aa..f9f7cdbd1 100644 --- a/docker/develop/buster/Dockerfile +++ b/docker/develop/buster/Dockerfile @@ -1,4 +1,4 @@ -#### Base Image: Debian 10, Codename 'Buster' +#### Base Image: Debian 10 (Buster) FROM golang:1-buster # Copyright © 2018 - 2022 PhotoPrism UG. All rights reserved. @@ -8,8 +8,8 @@ FROM golang:1-buster # Open Container Initiative (OCI) Annotations # see https://github.com/opencontainers/image-spec/blob/main/annotations.md -LABEL org.opencontainers.image.title="PhotoPrism Build Environment" -LABEL org.opencontainers.image.description="Debian 10, Codename 'Buster'" +LABEL org.opencontainers.image.title="PhotoPrism® Dev (Debian 10)" +LABEL org.opencontainers.image.description="Debian 10 (Buster)" LABEL org.opencontainers.image.url="https://hub.docker.com/repository/docker/photoprism/develop" LABEL org.opencontainers.image.source="https://github.com/photoprism/photoprism" LABEL org.opencontainers.image.documentation="https://docs.photoprism.app/developer-guide/setup/" diff --git a/docker/develop/impish/Dockerfile b/docker/develop/impish/Dockerfile index 63ffa1b8e..645bb405e 100644 --- a/docker/develop/impish/Dockerfile +++ b/docker/develop/impish/Dockerfile @@ -1,4 +1,4 @@ -#### Base Image: Ubuntu 21.10, Codename 'Impish Indri' +#### Base Image: Ubuntu 21.10 (Impish Indri) FROM ubuntu:impish # Copyright © 2018 - 2022 PhotoPrism UG. All rights reserved. @@ -8,8 +8,8 @@ FROM ubuntu:impish # Add Open Container Initiative (OCI) annotations. # See: https://github.com/opencontainers/image-spec/blob/main/annotations.md -LABEL org.opencontainers.image.title="PhotoPrism Build Environment" -LABEL org.opencontainers.image.description="Ubuntu 21.10, Codename 'Impish Indri'" +LABEL org.opencontainers.image.title="PhotoPrism® Dev (Ubuntu 21.10)" +LABEL org.opencontainers.image.description="Ubuntu 21.10 (Impish Indri)" LABEL org.opencontainers.image.url="https://hub.docker.com/repository/docker/photoprism/develop" LABEL org.opencontainers.image.source="https://github.com/photoprism/photoprism" LABEL org.opencontainers.image.documentation="https://docs.photoprism.app/developer-guide/setup/" diff --git a/docker/develop/jammy-slim/Dockerfile b/docker/develop/jammy-slim/Dockerfile index 53b4e31b6..139580ebe 100644 --- a/docker/develop/jammy-slim/Dockerfile +++ b/docker/develop/jammy-slim/Dockerfile @@ -8,7 +8,7 @@ FROM ubuntu:jammy # Add Open Container Initiative (OCI) annotations. # See: https://github.com/opencontainers/image-spec/blob/main/annotations.md -LABEL org.opencontainers.image.title="PhotoPrism Base Image (Ubuntu 22.04 LTS)" +LABEL org.opencontainers.image.title="PhotoPrism® Base Image (Ubuntu 22.04 LTS)" LABEL org.opencontainers.image.description="Ubuntu 22.04 LTS (Jammy Jellyfish)" LABEL org.opencontainers.image.url="https://hub.docker.com/repository/docker/photoprism/develop" LABEL org.opencontainers.image.source="https://github.com/photoprism/photoprism" diff --git a/docker/develop/jammy/Dockerfile b/docker/develop/jammy/Dockerfile index 7e07f05b9..20fbe5f06 100644 --- a/docker/develop/jammy/Dockerfile +++ b/docker/develop/jammy/Dockerfile @@ -8,7 +8,7 @@ FROM ubuntu:jammy # Add Open Container Initiative (OCI) annotations. # See: https://github.com/opencontainers/image-spec/blob/main/annotations.md -LABEL org.opencontainers.image.title="PhotoPrism Develop (Ubuntu 22.04 LTS)" +LABEL org.opencontainers.image.title="PhotoPrism® Dev (Ubuntu 22.04 LTS)" LABEL org.opencontainers.image.description="Ubuntu 22.04 LTS (Jammy Jellyfish)" LABEL org.opencontainers.image.url="https://hub.docker.com/repository/docker/photoprism/develop" LABEL org.opencontainers.image.source="https://github.com/photoprism/photoprism" diff --git a/docker/photoprism/armv7/Dockerfile b/docker/photoprism/armv7/Dockerfile index f3a83407b..f0fb15098 100644 --- a/docker/photoprism/armv7/Dockerfile +++ b/docker/photoprism/armv7/Dockerfile @@ -1,26 +1,41 @@ ##################################################### BUILD STAGE ###################################################### FROM photoprism/develop:armv7 as build +# Copyright © 2018 - 2022 PhotoPrism UG. All rights reserved. +# +# Questions? Email us at hello@photoprism.app or visit our website to learn +# more about our team, products and services: https://photoprism.app/ + +# Declare build parameters. ARG TARGETARCH ARG BUILD_TAG -# set up project directory +# Copy source to image. WORKDIR "/go/src/github.com/photoprism/photoprism" COPY . . -# build and install dist files for prod env +# Build app. RUN make all install DESTDIR=/opt/photoprism ################################################## PRODUCTION STAGE #################################################### -#### Base Image: Debian 12, Codename "Bookworm" +#### Base Image: Debian 12 (Bookworm) FROM debian:bookworm-slim -LABEL maintainer="Michael Mayer " +# Add Open Container Initiative (OCI) annotations. +# See: https://github.com/opencontainers/image-spec/blob/main/annotations.md +LABEL org.opencontainers.image.title="PhotoPrism® Community Edition (ARMv7)" +LABEL org.opencontainers.image.description="Debian 12 (Bookworm)" +LABEL org.opencontainers.image.url="https://hub.docker.com/repository/docker/photoprism/photoprism" +LABEL org.opencontainers.image.source="https://github.com/photoprism/photoprism" +LABEL org.opencontainers.image.documentation="https://docs.photoprism.app/getting-started/" +LABEL org.opencontainers.image.authors="Michael Mayer " +LABEL org.opencontainers.image.vendor="PhotoPrism UG" +# Declare build parameters. ARG TARGETARCH ARG BUILD_TAG -# set environment variables, see https://docs.photoprism.app/getting-started/config-options/ +# Set environment variables, see https://docs.photoprism.app/getting-started/config-options/. ENV PHOTOPRISM_ARCH=$TARGETARCH \ DOCKER_TAG=$BUILD_TAG \ DOCKER_ENV="prod" \ @@ -76,12 +91,12 @@ ENV PHOTOPRISM_ARCH=$TARGETARCH \ PHOTOPRISM_AUTO_INDEX=300 \ PHOTOPRISM_AUTO_IMPORT=300 -# copy dist files, scripts, and debian backports sources list +# Copy dist files, scripts, and debian backports sources list. COPY --from=build --chown=root:root --chmod=755 /opt/photoprism/ /opt/photoprism COPY --chown=root:root --chmod=755 /scripts/dist/* /scripts/ COPY /docker/develop/bookworm/sources.list /etc/apt/sources.list.d/bookworm.list -# install additional distribution packages +# Update base image and add 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 && \ @@ -114,14 +129,14 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \ /photoprism/storage/cache && \ /scripts/cleanup.sh -# define default directory and user +# Default working directory. WORKDIR /photoprism -# expose default http port 2342 +# Expose HTTP port. EXPOSE 2342 -# set container entrypoint script +# Declare container entrypoint script. ENTRYPOINT ["/scripts/entrypoint.sh"] -# start app server +# Start app. CMD ["/opt/photoprism/bin/photoprism", "start"] diff --git a/docker/photoprism/bookworm/Dockerfile b/docker/photoprism/bookworm/Dockerfile index 0684e3bc7..80d7bd848 100644 --- a/docker/photoprism/bookworm/Dockerfile +++ b/docker/photoprism/bookworm/Dockerfile @@ -1,24 +1,41 @@ ##################################################### BUILD STAGE ###################################################### FROM photoprism/develop:bookworm as build +# Copyright © 2018 - 2022 PhotoPrism UG. All rights reserved. +# +# Questions? Email us at hello@photoprism.app or visit our website to learn +# more about our team, products and services: https://photoprism.app/ + +# Declare build parameters. ARG TARGETARCH ARG BUILD_TAG -# set up project directory +# Copy source to image. WORKDIR "/go/src/github.com/photoprism/photoprism" COPY . . -# build and install dist files for prod env +# Build app. RUN make all install DESTDIR=/opt/photoprism ################################################## PRODUCTION STAGE #################################################### -#### Base Image: Debian 12, Codename "Bookworm" +#### Base Image: Debian 12 (Bookworm) FROM photoprism/develop:bookworm-slim +# Add Open Container Initiative (OCI) annotations. +# See: https://github.com/opencontainers/image-spec/blob/main/annotations.md +LABEL org.opencontainers.image.title="PhotoPrism® Community Edition (Debian 12)" +LABEL org.opencontainers.image.description="Debian 12 (Bookworm)" +LABEL org.opencontainers.image.url="https://hub.docker.com/repository/docker/photoprism/photoprism" +LABEL org.opencontainers.image.source="https://github.com/photoprism/photoprism" +LABEL org.opencontainers.image.documentation="https://docs.photoprism.app/getting-started/" +LABEL org.opencontainers.image.authors="Michael Mayer " +LABEL org.opencontainers.image.vendor="PhotoPrism UG" + +# Declare build parameters. ARG TARGETARCH ARG BUILD_TAG -# set environment variables, see https://docs.photoprism.app/getting-started/config-options/ +# Set environment variables, see https://docs.photoprism.app/getting-started/config-options/. ENV PHOTOPRISM_ARCH=$TARGETARCH \ DOCKER_TAG=$BUILD_TAG \ DOCKER_ENV="prod" \ @@ -71,26 +88,26 @@ ENV PHOTOPRISM_ARCH=$TARGETARCH \ PHOTOPRISM_AUTO_INDEX=300 \ PHOTOPRISM_AUTO_IMPORT=300 -# copy scripts +# Copy scripts. COPY --chown=root:root --chmod=755 /scripts/dist/* /scripts/ -# update pre-installed packages if needed +# Update pre-installed packages. RUN apt-get update && \ apt-get -qq upgrade && \ /scripts/cleanup.sh -# define default directory and user +# Default working directory. WORKDIR /photoprism -# expose default http port 2342 +# Expose HTTP port. EXPOSE 2342 # copy dist files COPY --from=build --chown=root:root --chmod=755 /opt/photoprism/ /opt/photoprism RUN mv /opt/photoprism/sbin/gosu /usr/local/sbin/gosu -# set container entrypoint script +# Declare container entrypoint script. ENTRYPOINT ["/scripts/entrypoint.sh"] -# start app server +# Start app. CMD ["/opt/photoprism/bin/photoprism", "start"] diff --git a/docker/photoprism/bullseye/Dockerfile b/docker/photoprism/bullseye/Dockerfile index c94d08e83..a8c0b1c75 100644 --- a/docker/photoprism/bullseye/Dockerfile +++ b/docker/photoprism/bullseye/Dockerfile @@ -1,24 +1,41 @@ ##################################################### BUILD STAGE ###################################################### FROM photoprism/develop:bullseye as build +# Copyright © 2018 - 2022 PhotoPrism UG. All rights reserved. +# +# Questions? Email us at hello@photoprism.app or visit our website to learn +# more about our team, products and services: https://photoprism.app/ + +# Declare build parameters. ARG TARGETARCH ARG BUILD_TAG -# set up project directory +# Copy source to image. WORKDIR "/go/src/github.com/photoprism/photoprism" COPY . . -# build and install dist files for prod env +# Build app. RUN make all install DESTDIR=/opt/photoprism ################################################## PRODUCTION STAGE #################################################### -#### Base Image: Debian 11, Codename "Bullseye" +#### Base Image: Debian 11 (Bullseye) FROM photoprism/develop:bullseye-slim +# Add Open Container Initiative (OCI) annotations. +# See: https://github.com/opencontainers/image-spec/blob/main/annotations.md +LABEL org.opencontainers.image.title="PhotoPrism® Community Edition (Debian 11)" +LABEL org.opencontainers.image.description="Debian 11 (Bullseye)" +LABEL org.opencontainers.image.url="https://hub.docker.com/repository/docker/photoprism/photoprism" +LABEL org.opencontainers.image.source="https://github.com/photoprism/photoprism" +LABEL org.opencontainers.image.documentation="https://docs.photoprism.app/getting-started/" +LABEL org.opencontainers.image.authors="Michael Mayer " +LABEL org.opencontainers.image.vendor="PhotoPrism UG" + +# Declare build parameters. ARG TARGETARCH ARG BUILD_TAG -# set environment variables, see https://docs.photoprism.app/getting-started/config-options/ +# Set environment variables, see https://docs.photoprism.app/getting-started/config-options/. ENV PHOTOPRISM_ARCH=$TARGETARCH \ DOCKER_TAG=$BUILD_TAG \ DOCKER_ENV="prod" \ @@ -71,26 +88,26 @@ ENV PHOTOPRISM_ARCH=$TARGETARCH \ PHOTOPRISM_AUTO_INDEX=300 \ PHOTOPRISM_AUTO_IMPORT=300 -# copy scripts +# Copy scripts. COPY --chown=root:root --chmod=755 /scripts/dist/* /scripts/ -# update pre-installed packages if needed +# Update pre-installed packages. RUN apt-get update && \ apt-get -qq dist-upgrade && \ /scripts/cleanup.sh -# define default directory and user +# Default working directory. WORKDIR /photoprism -# expose default http port 2342 +# Expose HTTP port. EXPOSE 2342 # copy dist files COPY --from=build --chown=root:root --chmod=755 /opt/photoprism/ /opt/photoprism RUN mv /opt/photoprism/sbin/gosu /usr/local/sbin/gosu -# set container entrypoint script +# Declare container entrypoint script. ENTRYPOINT ["/scripts/entrypoint.sh"] -# start app server +# Start app. CMD ["/opt/photoprism/bin/photoprism", "start"] diff --git a/docker/photoprism/buster/Dockerfile b/docker/photoprism/buster/Dockerfile index 08481b6a4..3b1fb54c2 100644 --- a/docker/photoprism/buster/Dockerfile +++ b/docker/photoprism/buster/Dockerfile @@ -1,26 +1,41 @@ ##################################################### BUILD STAGE ###################################################### FROM photoprism/develop:buster as build +# Copyright © 2018 - 2022 PhotoPrism UG. All rights reserved. +# +# Questions? Email us at hello@photoprism.app or visit our website to learn +# more about our team, products and services: https://photoprism.app/ + +# Declare build parameters. ARG TARGETARCH ARG BUILD_TAG -# set up project directory +# Copy source to image. WORKDIR "/go/src/github.com/photoprism/photoprism" COPY . . -# build and install dist files for prod env +# Build app. RUN make all install DESTDIR=/opt/photoprism ################################################## PRODUCTION STAGE #################################################### -#### Base Image: Debian 10, Codename "Buster" +#### Base Image: Debian 10 (Buster) FROM debian:buster-slim -LABEL maintainer="Michael Mayer " +# Add Open Container Initiative (OCI) annotations. +# See: https://github.com/opencontainers/image-spec/blob/main/annotations.md +LABEL org.opencontainers.image.title="PhotoPrism® Community Edition (Debian 10)" +LABEL org.opencontainers.image.description="Debian 10 (Buster)" +LABEL org.opencontainers.image.url="https://hub.docker.com/repository/docker/photoprism/photoprism" +LABEL org.opencontainers.image.source="https://github.com/photoprism/photoprism" +LABEL org.opencontainers.image.documentation="https://docs.photoprism.app/getting-started/" +LABEL org.opencontainers.image.authors="Michael Mayer " +LABEL org.opencontainers.image.vendor="PhotoPrism UG" +# Declare build parameters. ARG TARGETARCH ARG BUILD_TAG -# set environment variables, see https://docs.photoprism.app/getting-started/config-options/ +# Set environment variables, see https://docs.photoprism.app/getting-started/config-options/. ENV PHOTOPRISM_ARCH=$TARGETARCH \ DOCKER_TAG=$BUILD_TAG \ DOCKER_ENV="prod" \ @@ -76,12 +91,12 @@ ENV PHOTOPRISM_ARCH=$TARGETARCH \ PHOTOPRISM_AUTO_INDEX=300 \ PHOTOPRISM_AUTO_IMPORT=300 -# copy dist files, scripts, and debian backports sources list +# Copy dist files, scripts, and debian backports sources list. COPY --from=build --chown=root:root --chmod=755 /opt/photoprism/ /opt/photoprism COPY --chown=root:root --chmod=755 /scripts/dist/* /scripts/ COPY --chown=root:root --chmod=644 /docker/develop/buster/sources.list /etc/apt/sources.list.d/buster.list -# install additional distribution packages +# Update base image and add 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 && \ @@ -130,14 +145,14 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \ /photoprism/storage/cache && \ /scripts/cleanup.sh -# define default directory and user +# Default working directory. WORKDIR /photoprism -# expose default http port 2342 +# Expose HTTP port. EXPOSE 2342 -# set container entrypoint script +# Declare container entrypoint script. ENTRYPOINT ["/scripts/entrypoint.sh"] -# start app server +# Start app. CMD ["/opt/photoprism/bin/photoprism", "start"] diff --git a/docker/photoprism/impish/Dockerfile b/docker/photoprism/impish/Dockerfile index fe0304c0e..872f02b03 100644 --- a/docker/photoprism/impish/Dockerfile +++ b/docker/photoprism/impish/Dockerfile @@ -1,26 +1,41 @@ ##################################################### BUILD STAGE ###################################################### FROM photoprism/develop:impish as build +# Copyright © 2018 - 2022 PhotoPrism UG. All rights reserved. +# +# Questions? Email us at hello@photoprism.app or visit our website to learn +# more about our team, products and services: https://photoprism.app/ + +# Declare build parameters. ARG TARGETARCH ARG BUILD_TAG -# set up project directory +# Copy source to image. WORKDIR "/go/src/github.com/photoprism/photoprism" COPY . . -# build and install dist files for prod env +# Build app. RUN make all install DESTDIR=/opt/photoprism ################################################## PRODUCTION STAGE #################################################### -#### Base Image: Ubuntu 21.10, Codename "Impish Indri" +#### Base Image: Ubuntu 21.10 (Impish Indri) FROM ubuntu:impish -LABEL maintainer="Michael Mayer " +# Add Open Container Initiative (OCI) annotations. +# See: https://github.com/opencontainers/image-spec/blob/main/annotations.md +LABEL org.opencontainers.image.title="PhotoPrism® Community Edition (Ubuntu 21.10)" +LABEL org.opencontainers.image.description="Ubuntu 21.10 (Impish Indri)" +LABEL org.opencontainers.image.url="https://hub.docker.com/repository/docker/photoprism/photoprism" +LABEL org.opencontainers.image.source="https://github.com/photoprism/photoprism" +LABEL org.opencontainers.image.documentation="https://docs.photoprism.app/getting-started/" +LABEL org.opencontainers.image.authors="Michael Mayer " +LABEL org.opencontainers.image.vendor="PhotoPrism UG" +# Declare build parameters. ARG TARGETARCH ARG BUILD_TAG -# set environment variables, see https://docs.photoprism.app/getting-started/config-options/ +# Set environment variables, see https://docs.photoprism.app/getting-started/config-options/. ENV PHOTOPRISM_ARCH=$TARGETARCH \ DOCKER_TAG=$BUILD_TAG \ DOCKER_ENV="prod" \ @@ -76,11 +91,11 @@ ENV PHOTOPRISM_ARCH=$TARGETARCH \ PHOTOPRISM_AUTO_INDEX=300 \ PHOTOPRISM_AUTO_IMPORT=300 -# copy dist files and scripts +# Copy dist files and scripts. COPY --from=build --chown=root:root --chmod=755 /opt/photoprism/ /opt/photoprism COPY --chown=root:root --chmod=755 /scripts/dist/* /scripts/ -# install additional distribution packages +# Update base image and add 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 && \ @@ -128,14 +143,14 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \ /photoprism/storage/cache && \ /scripts/cleanup.sh -# define default directory and user +# Default working directory. WORKDIR /photoprism -# expose default http port 2342 +# Expose HTTP port. EXPOSE 2342 -# set container entrypoint script +# Declare container entrypoint script. ENTRYPOINT ["/scripts/entrypoint.sh"] -# start app server +# Start app. CMD ["/opt/photoprism/bin/photoprism", "start"] diff --git a/docker/photoprism/jammy/Dockerfile b/docker/photoprism/jammy/Dockerfile index a9baabbb1..f06d7ed27 100644 --- a/docker/photoprism/jammy/Dockerfile +++ b/docker/photoprism/jammy/Dockerfile @@ -11,7 +11,7 @@ ARG TARGETARCH ARG TARGETPLATFORM ARG BUILD_TAG -# Copy project files. +# Copy source to image. WORKDIR "/go/src/github.com/photoprism/photoprism" COPY . . @@ -24,11 +24,11 @@ FROM photoprism/develop:jammy-slim # Add Open Container Initiative (OCI) annotations. # See: https://github.com/opencontainers/image-spec/blob/main/annotations.md -LABEL org.opencontainers.image.title="PhotoPrism CE" +LABEL org.opencontainers.image.title="PhotoPrism® Community Edition (Ubuntu 22.04 LTS)" LABEL org.opencontainers.image.description="Ubuntu 22.04 LTS (Jammy Jellyfish)" LABEL org.opencontainers.image.url="https://hub.docker.com/repository/docker/photoprism/photoprism" LABEL org.opencontainers.image.source="https://github.com/photoprism/photoprism" -LABEL org.opencontainers.image.documentation="https://docs.photoprism.app/developer-guide/setup/" +LABEL org.opencontainers.image.documentation="https://docs.photoprism.app/getting-started/" LABEL org.opencontainers.image.authors="Michael Mayer " LABEL org.opencontainers.image.vendor="PhotoPrism UG"