Created
May 2, 2023 18:08
-
-
Save fletchowns/7a7bbe277ef007d2a0e3717c6e9f0d66 to your computer and use it in GitHub Desktop.
Photoprism Debian Bullseye Docker Build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:bullseye-slim | |
MAINTAINER Greg Barker <fletch@fletchowns.net> | |
# Based on https://github.com/IndrekHaav/photoprism-debian | |
RUN apt-get update \ | |
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \ | |
sudo \ | |
curl \ | |
wget \ | |
gcc \ | |
g++ \ | |
git \ | |
gnupg \ | |
make \ | |
zip \ | |
unzip \ | |
ffmpeg \ | |
&& curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \ | |
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \ | |
nodejs \ | |
&& wget https://golang.org/dl/go1.19.3.linux-amd64.tar.gz -O /tmp/go.tar.gz \ | |
&& tar -xvzf /tmp/go.tar.gz -C /usr/local \ | |
&& ln -s /usr/local/go/bin/go /usr/local/bin/go \ | |
&& wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-avx2-1.15.2.tar.gz -O /tmp/libtensorflow.tar.gz \ | |
&& tar -xvzf /tmp/libtensorflow.tar.gz -C /usr/local \ | |
&& ldconfig \ | |
&& mkdir -p /opt/photoprism/bin \ | |
&& groupadd -g 2009 photoprism \ | |
&& useradd -u 2009 --create-home --home /var/lib/photoprism --shell /bin/bash --gid photoprism photoprism \ | |
&& mkdir -p /tmp/photoprism \ | |
&& git clone https://github.com/photoprism/photoprism.git /tmp/photoprism \ | |
&& cd /tmp/photoprism \ | |
&& git checkout 221118-e58fee0fb \ | |
&& make all \ | |
&& ./scripts/build.sh prod /opt/photoprism/bin/photoprism \ | |
&& cp -a assets/ /opt/photoprism/assets/ \ | |
&& chown -R photoprism:photoprism /opt/photoprism \ | |
&& apt-get clean \ | |
&& rm -rf /var/lib/apt/lists/* \ | |
&& rm -rf /tmp/* \ | |
&& rm -rf /var/tmp/* | |
USER photoprism | |
WORKDIR /var/lib/photoprism | |
COPY runserver.sh /usr/local/bin/ | |
CMD ["runserver.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
/opt/photoprism/bin/photoprism start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment