Build: Update Dockerfiles
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
parent
54a41e682c
commit
ae2375ea09
|
@ -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/
|
|
@ -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/"
|
||||
|
|
|
@ -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/"
|
||||
|
|
|
@ -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/"
|
||||
|
|
|
@ -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/"
|
||||
|
|
|
@ -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/"
|
||||
|
|
|
@ -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/"
|
||||
|
|
|
@ -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/"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 <hello@photoprism.app>"
|
||||
# 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 <hello@photoprism.app>"
|
||||
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"]
|
||||
|
|
|
@ -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 <hello@photoprism.app>"
|
||||
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"]
|
||||
|
|
|
@ -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 <hello@photoprism.app>"
|
||||
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"]
|
||||
|
|
|
@ -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 <hello@photoprism.app>"
|
||||
# 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 <hello@photoprism.app>"
|
||||
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"]
|
||||
|
|
|
@ -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 <hello@photoprism.app>"
|
||||
# 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 <hello@photoprism.app>"
|
||||
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"]
|
||||
|
|
|
@ -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 <hello@photoprism.app>"
|
||||
LABEL org.opencontainers.image.vendor="PhotoPrism UG"
|
||||
|
||||
|
|
Loading…
Reference in a new issue