-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
56 lines (50 loc) · 2 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# syntax=docker/dockerfile:1
# Howdy, need help? See
# <https://photostructure.com/server/photostructure-for-docker/>
# https://hub.docker.com/_/node/
FROM node:20.17-bookworm-slim as builder
# 202208: We're building libraw and SQLite here to pick up the latest bugfixes.
# Note that libjpeg62, liblcms2, and liborc dev dependencies are used in the
# first build stage which starts from this image. By installing them here,
# that stage doesn't need to muck with `apt`.
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
autoconf \
autogen \
automake \
build-essential \
ca-certificates \
curl \
git \
libjpeg62-turbo-dev \
liblcms2-dev \
liborc-0.4-dev \
libreadline-dev \
libtool \
pkg-config \
python3 \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/* \
&& npm install --force --location=global npm yarn \
&& mkdir -p /opt/photostructure/tools \
&& git clone https://github.com/LibRaw/LibRaw.git /tmp/libraw \
&& cd /tmp/libraw \
&& git checkout --force 70f511871e002942d3e6b60c99fe04ce5c0c605b \
&& autoreconf -fiv \
&& ./configure --enable-static --disable-lcms --disable-openmp \
&& make -j `nproc` \
&& /bin/bash ./libtool --tag=CXX --mode=link g++ -all-static -g -O2 -o bin/dcraw_emu samples/bin_dcraw_emu-dcraw_emu.o lib/libraw.la -ljpeg -lz -lm \
&& /bin/bash ./libtool --tag=CXX --mode=link g++ -all-static -g -O2 -o bin/raw-identify samples/bin_raw_identify-raw-identify.o lib/libraw.la -ljpeg -lz -lm \
&& cp -p bin/dcraw_emu bin/raw-identify /opt/photostructure/tools/ \
&& rm -rf /tmp/libraw \
&& mkdir -p /tmp/sqlite \
&& cd /tmp/sqlite \
&& curl https://sqlite.org/2024/sqlite-autoconf-3460100.tar.gz | tar -xz --strip 1 \
&& ./configure --enable-static --disable-shared --enable-readline \
&& make -j `nproc` \
&& cp -p sqlite3 /opt/photostructure/tools/ \
&& rm -rf /tmp/sqlite \
&& strip /opt/photostructure/tools/*
# Stripped LibRaw and SQLite binaries should now be sitting in
# /opt/photostructure/tools/bin.