CI: Update Dockerfiles

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer 2023-02-11 19:06:38 +01:00
parent 16a153bfa1
commit 1f1744a5ef
13 changed files with 108 additions and 21 deletions

View file

@ -55,7 +55,7 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
libssl-dev libxft-dev libfreetype6 libfreetype6-dev libfontconfig1 \
libfontconfig1-dev libhdf5-serial-dev libpng-dev libzmq3-dev \
libx264-dev libx265-dev libde265-dev libaom-dev libnss3 libxtst6 librsvg2-bin tzdata \
exiftool ffmpeg ffmpegthumbnailer libavcodec-extra \
exiftool ffmpeg libavcodec-extra \
&& \
/scripts/install-nodejs.sh && \
/scripts/install-tensorflow.sh && \

View file

@ -48,9 +48,8 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
gpg zip unzip wget curl rsync make nano \
jq lsof lshw sqlite3 mariadb-client imagemagick \
exiftool darktable rawtherapee libheif-examples librsvg2-bin \
ffmpeg ffmpegthumbnailer libavcodec-extra \
ffmpeg libavcodec-extra x264 x265 libvpx7 libwebm1 \
libmatroska7 libdvdread8 libebml5 libgav1-bin libatomic1 \
x264 x265 libvpx7 libwebm1 \
&& \
echo 'alias ll="ls -alh"' >> /etc/skel/.bashrc && \
echo 'export PS1="\u@$DOCKER_TAG:\w\$ "' >> /etc/skel/.bashrc && \

View file

@ -54,9 +54,8 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
gpg zip unzip wget curl rsync make nano \
jq lsof lshw sqlite3 mariadb-client imagemagick \
exiftool darktable rawtherapee libheif-examples librsvg2-bin \
ffmpeg ffmpegthumbnailer libavcodec-extra \
ffmpeg libavcodec-extra x264 x265 libvpx7 libwebm1 \
libmatroska7 libdvdread8 libebml5 libgav1-bin libatomic1 \
x264 x265 libvpx7 libwebm1 \
&& \
apt-get -qq install \
apt-utils pkg-config software-properties-common \

View file

@ -63,7 +63,6 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
rawtherapee \
imagemagick \
ffmpeg \
ffmpegthumbnailer \
libavcodec-extra \
x264 \
x265 \

View file

@ -100,7 +100,6 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
rawtherapee \
imagemagick \
ffmpeg \
ffmpegthumbnailer \
libavcodec-extra \
davfs2 \
chrpath \

View file

@ -97,7 +97,6 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
rawtherapee \
imagemagick \
ffmpeg \
ffmpegthumbnailer \
libavcodec-extra \
davfs2 \
chrpath \

View file

@ -96,7 +96,6 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
exiftool \
rawtherapee \
ffmpeg \
ffmpegthumbnailer \
libavcodec-extra \
apache2-utils \
fonts-roboto \

View file

@ -45,11 +45,9 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
apt-get -qq install \
libc6 ca-certificates sudo bash tzdata avahi-utils \
gpg zip unzip wget curl rsync make nano \
jq lsof lshw sqlite3 imagemagick \
exiftool rawtherapee librsvg2-bin \
ffmpeg ffmpegthumbnailer libavcodec-extra \
jq lsof lshw sqlite3 exiftool rawtherapee \
ffmpeg libavcodec-extra x264 x265 libde265-dev libaom3 libjpeg8 libvpx7 libwebm1 \
libmatroska7 libdvdread8 libebml5 libgav1-bin libatomic1 \
x264 x265 libde265-dev libaom3 libjpeg8 libvpx7 libwebm1 \
&& \
/scripts/install-mariadb.sh mariadb-client && \
/scripts/install-darktable.sh && \

View file

@ -51,11 +51,9 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
apt-get -qq install \
libc6 ca-certificates sudo bash tzdata avahi-utils \
gpg zip unzip wget curl rsync make nano \
jq lsof lshw sqlite3 imagemagick \
exiftool rawtherapee librsvg2-bin \
ffmpeg ffmpegthumbnailer libavcodec-extra \
jq lsof lshw sqlite3 exiftool rawtherapee \
ffmpeg libavcodec-extra x264 x265 libde265-dev libaom3 libjpeg8 libvpx7 libwebm1 \
libmatroska7 libdvdread8 libebml5 libgav1-bin libatomic1 \
x264 x265 libde265-dev libaom3 libjpeg8 libvpx7 libwebm1 \
&& \
apt-get -qq install \
apt-utils pkg-config software-properties-common \
@ -64,6 +62,7 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
libx264-dev libx265-dev libaom-dev libvpx-dev libwebm-dev libpng-dev libxft-dev \
libc6-dev libhdf5-serial-dev libzmq3-dev libssl-dev libnss3 \
libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev fonts-roboto \
imagemagick librsvg2-bin ghostscript \
&& \
/scripts/install-nodejs.sh && \
/scripts/install-mariadb.sh mariadb-client && \
@ -77,6 +76,7 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
echo 'export PS1="\u@$DOCKER_TAG:\w\$ "' >> /etc/skel/.bashrc && \
echo "ALL ALL=(ALL) NOPASSWD:SETENV: ALL" >> /etc/sudoers.d/all && \
cp /etc/skel/.bashrc /root/.bashrc && \
cp /scripts/convert/policy.xml /etc/ImageMagick-6/policy.xml && \
/scripts/create-users.sh && \
install -d -m 0777 -o 1000 -g 1000 \
/photoprism/originals \

View file

@ -106,9 +106,8 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
gpg zip unzip wget curl rsync make nano \
jq lsof lshw sqlite3 mariadb-client imagemagick \
exiftool rawtherapee librsvg2-bin \
ffmpeg ffmpegthumbnailer libavcodec-extra \
ffmpeg libavcodec-extra x264 x265 libde265-dev libaom3 libjpeg8 libvpx7 libwebm1 \
libmatroska7 libdvdread8 libebml5 libgav1-bin libatomic1 \
x264 x265 libde265-dev libaom3 libjpeg8 libvpx7 libwebm1 \
&& \
/scripts/install-libheif.sh && \
echo 'alias ll="ls -alh"' >> /etc/skel/.bashrc && \

View file

@ -123,7 +123,6 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
rawtherapee \
imagemagick \
ffmpeg \
ffmpegthumbnailer \
libavcodec-extra \
&& \
/scripts/install-darktable.sh && \

View file

@ -121,7 +121,6 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
exiftool \
rawtherapee \
ffmpeg \
ffmpegthumbnailer \
libavcodec-extra \
&& \
/scripts/install-darktable.sh && \

98
scripts/dist/convert/policy.xml vendored Normal file
View file

@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policymap [
<!ELEMENT policymap (policy)*>
<!ATTLIST policymap xmlns CDATA #FIXED ''>
<!ELEMENT policy EMPTY>
<!ATTLIST policy xmlns CDATA #FIXED '' domain NMTOKEN #REQUIRED
name NMTOKEN #IMPLIED pattern CDATA #IMPLIED rights NMTOKEN #IMPLIED
stealth NMTOKEN #IMPLIED value CDATA #IMPLIED>
]>
<!--
Configure ImageMagick policies.
Domains include system, delegate, coder, filter, path, or resource.
Rights include none, read, write, execute and all. Use | to combine them,
for example: "read | write" to permit read from, or write to, a path.
Use a glob expression as a pattern.
Suppose we do not want users to process MPEG video images:
<policy domain="delegate" rights="none" pattern="mpeg:decode" />
Here we do not want users reading images from HTTP:
<policy domain="coder" rights="none" pattern="HTTP" />
The /repository file system is restricted to read only. We use a glob
expression to match all paths that start with /repository:
<policy domain="path" rights="read" pattern="/repository/*" />
Lets prevent users from executing any image filters:
<policy domain="filter" rights="none" pattern="*" />
Any large image is cached to disk rather than memory:
<policy domain="resource" name="area" value="1GP"/>
Use the default system font unless overwridden by the application:
<policy domain="system" name="font" value="/usr/share/fonts/favorite.ttf"/>
Define arguments for the memory, map, area, width, height and disk resources
with SI prefixes (.e.g 100MB). In addition, resource policies are maximums
for each instance of ImageMagick (e.g. policy memory limit 1GB, -limit 2GB
exceeds policy maximum so memory limit is 1GB).
Rules are processed in order. Here we want to restrict ImageMagick to only
read or write a small subset of proven web-safe image types:
<policy domain="delegate" rights="none" pattern="*" />
<policy domain="filter" rights="none" pattern="*" />
<policy domain="coder" rights="none" pattern="*" />
<policy domain="coder" rights="read|write" pattern="{GIF,JPEG,PNG,WEBP}" />
-->
<policymap>
<!-- <policy domain="resource" name="temporary-path" value="/tmp"/> -->
<policy domain="resource" name="memory" value="256MiB"/>
<policy domain="resource" name="map" value="512MiB"/>
<policy domain="resource" name="width" value="16KP"/>
<policy domain="resource" name="height" value="16KP"/>
<!-- <policy domain="resource" name="list-length" value="128"/> -->
<policy domain="resource" name="area" value="128MP"/>
<policy domain="resource" name="disk" value="1GiB"/>
<!-- <policy domain="resource" name="file" value="768"/> -->
<!-- <policy domain="resource" name="thread" value="4"/> -->
<!-- <policy domain="resource" name="throttle" value="0"/> -->
<!-- <policy domain="resource" name="time" value="3600"/> -->
<!-- <policy domain="coder" rights="none" pattern="MVG" /> -->
<!-- <policy domain="module" rights="none" pattern="{PS,PDF,XPS}" /> -->
<!-- <policy domain="path" rights="none" pattern="@*" /> -->
<!-- <policy domain="cache" name="memory-map" value="anonymous"/> -->
<!-- <policy domain="cache" name="synchronize" value="True"/> -->
<!-- <policy domain="cache" name="shared-secret" value="passphrase" stealth="true"/>
<!-- <policy domain="system" name="max-memory-request" value="256MiB"/> -->
<!-- <policy domain="system" name="shred" value="2"/> -->
<!-- <policy domain="system" name="precision" value="6"/> -->
<!-- <policy domain="system" name="font" value="/path/to/font.ttf"/> -->
<!-- <policy domain="system" name="pixel-cache-memory" value="anonymous"/> -->
<!-- <policy domain="system" name="shred" value="2"/> -->
<!-- <policy domain="system" name="precision" value="6"/> -->
<!-- not needed due to the need to use explicitly by mvg: -->
<!-- <policy domain="delegate" rights="none" pattern="MVG" /> -->
<!-- use curl -->
<policy domain="delegate" rights="none" pattern="URL" />
<policy domain="delegate" rights="none" pattern="HTTPS" />
<policy domain="delegate" rights="none" pattern="HTTP" />
<!-- in order to avoid to get image with password text -->
<policy domain="path" rights="none" pattern="@*"/>
<!-- disable ghostscript format types -->
<policy domain="coder" rights="none" pattern="PS" />
<policy domain="coder" rights="none" pattern="PS2" />
<policy domain="coder" rights="none" pattern="PS3" />
<policy domain="coder" rights="none" pattern="PDF" />
<policy domain="coder" rights="none" pattern="XPS" />
</policymap>