Fix darktable docker install

and print version of executable workers on startup
This commit is contained in:
viktorstrate
2021-03-03 13:32:44 +01:00
parent cc3f8a3aa4
commit c18759e6db
5 changed files with 89 additions and 41 deletions

View File

@@ -66,21 +66,28 @@ RUN go build -v -o photoview .
### Copy api and ui to production environment ###
FROM debian:buster
ARG TARGETPLATFORM
WORKDIR /app
COPY api/data /app/data
# Use official PPA for Darktable to get the latest version
RUN echo 'deb http://download.opensuse.org/repositories/graphics:/darktable/Debian_10/ /' | tee /etc/apt/sources.list.d/graphics:darktable.list \
curl -fsSL https://download.opensuse.org/repositories/graphics:darktable/Debian_10/Release.key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/graphics_darktable.gpg > /dev/null
RUN apt-get update \
# Required dependencies
&& apt-get install -y libdlib19 ffmpeg \
# Optional dependencies
&& apt-get install -y darktable; exit 0 \
# Cleanup
&& apt-get clean && rm -rf /var/lib/apt/lists/*
&& apt-get install -y curl gpg libdlib19 ffmpeg
# Install Darktable if building for a supported architecture
RUN if [ "${TARGETPLATFORM}" = "linux/amd64" ] || [ "${TARGETPLATFORM}" = "linux/arm64" ]; then \
echo 'deb http://download.opensuse.org/repositories/graphics:/darktable/Debian_10/ /' | tee /etc/apt/sources.list.d/graphics:darktable.list \
&& curl -fsSL https://download.opensuse.org/repositories/graphics:darktable/Debian_10/Release.key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/graphics_darktable.gpg > /dev/null \
&& apt-get update \
&& apt-get install -y darktable; \
fi
# Remove build dependencies and cleanup
RUN apt-get purge -y curl gpg \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY --from=ui /app/dist /ui
COPY --from=api /app/photoview /app/photoview