Skip to content

Commit 7aab982

Browse files
committed
Update to Docker files (elimination of build warnings) and addition of new Debian image using the latest iipsrv stable release
1 parent f04ccca commit 7aab982

5 files changed

Lines changed: 65 additions & 8 deletions

File tree

docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
FROM alpine:latest
1111

1212
LABEL org.opencontainers.image.authors="ruven@users.sourceforge.net"
13-
LABEL url "https://iipimage.sourceforge.io"
13+
LABEL url="https://iipimage.sourceforge.io"
1414
LABEL author "Ruven <ruven@users.sourceforge.net>"
1515
EXPOSE 80 9000
1616

@@ -59,4 +59,4 @@ chmod u+x /usr/local/bin/run
5959

6060
# Set iipsrv environment defaults and execute startup script
6161
ENV HOST="0.0.0.0" PORT="9000" LOGFILE="/dev/stdout" URI_MAP="iiif=>IIIF" VERBOSITY=6 FILESYSTEM_PREFIX="/images/"
62-
ENTRYPOINT run
62+
ENTRYPOINT ["run"]

docker/Dockerfile.debian

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
FROM debian:stable-slim
1111

1212
LABEL org.opencontainers.image.authors="ruven@users.sourceforge.net"
13-
LABEL url "https://iipimage.sourceforge.io"
14-
LABEL author "Ruven <ruven@users.sourceforge.net>"
13+
LABEL url="https://iipimage.sourceforge.io"
14+
LABEL author="Ruven <ruven@users.sourceforge.net>"
1515
EXPOSE 80 9000
1616

1717
# Install build dependencies
@@ -66,4 +66,4 @@ chmod u+x /usr/local/bin/run
6666

6767
# Set iipsrv environment defaults and execute startup script
6868
ENV HOST="0.0.0.0" PORT="9000" LOGFILE="/dev/stdout" URI_MAP="iiif=>IIIF" VERBOSITY=6 FILESYSTEM_PREFIX="/images/"
69-
ENTRYPOINT run
69+
ENTRYPOINT ["run"]

docker/Dockerfile.debian-release

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# IIPImage Dockerfile based on Debian Linux
2+
#
3+
# iipsrv: latest stable version from IIPImage apt repository
4+
# - installs keyring and iipsrv apt package
5+
# - starts HTTP and FCGI services
6+
# - reads images from /images/
7+
# - provides /fcgi-bin/iipsrv.fcgi and /iiif/ endpoints
8+
#
9+
10+
FROM debian:stable-slim
11+
ENV DEBIAN_FRONTEND=noninteractive
12+
13+
LABEL MAINTAINER=ruven@users.sourceforge.net
14+
LABEL url="https://iipimage.sourceforge.io"
15+
LABEL author="Ruven <ruven@users.sourceforge.net>"
16+
EXPOSE 80 9000
17+
18+
19+
# Install build dependencies
20+
RUN apt-get update && \
21+
apt-get install --no-install-recommends -y \
22+
ca-certificates \
23+
media-types \
24+
lighttpd \
25+
apt-transport-https && \
26+
update-ca-certificates
27+
28+
29+
# Install keyring and iipsrv
30+
COPY iipimage-keyring_1.0.0-1+trixie_all.deb /tmp/
31+
RUN dpkg -i /tmp/iipimage-keyring_1.0.0-1+trixie_all.deb && \
32+
apt-get update && \
33+
apt-get install --no-install-recommends -y iipimage-server
34+
35+
36+
# Append lighttpd configuration to enable FCGI proxy forwarding to iipsrv
37+
RUN env echo -e 'server.modules += ("mod_fastcgi")\n\
38+
fastcgi.server = (\n\
39+
"/fcgi-bin/iipsrv.fcgi" => (("host"=>"0.0.0.0","port"=>9000,"check-local"=>"disable")),\n\
40+
"/iiif/" => (("host"=>"0.0.0.0","port"=>9000,"check-local"=>"disable"))\n\
41+
)' >> /etc/lighttpd/conf-enabled/iipsrv.conf
42+
43+
44+
# Create startup script which starts both lighttpd and iipsrv
45+
RUN env echo -e "#!/bin/sh\n\
46+
lighttpd -f /etc/lighttpd/lighttpd.conf \n\
47+
iipsrv --bind \${HOST}:\${PORT}" > /usr/local/bin/run &&\
48+
chmod u+x /usr/local/bin/run
49+
50+
51+
# Set iipsrv environment defaults and execute startup script
52+
ENV HOST="0.0.0.0" PORT="9000" LOGFILE="/dev/stdout" URI_MAP="iiif=>IIIF" VERBOSITY=6 FILESYSTEM_PREFIX="/images/"
53+
ENTRYPOINT ["run"]

docker/Dockerfile.release

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ ARG ARCH=
1111
FROM ${ARCH}alpine:edge
1212

1313
LABEL org.opencontainers.image.authors="ruven@users.sourceforge.net"
14-
LABEL url "https://iipimage.sourceforge.io"
15-
LABEL author "Ruven <ruven@users.sourceforge.net>"
14+
LABEL url="https://iipimage.sourceforge.io"
15+
LABEL author="Ruven <ruven@users.sourceforge.net>"
1616
EXPOSE 80 9000
1717

1818
# Install build dependencies
@@ -35,4 +35,4 @@ chmod u+x /usr/local/bin/run
3535

3636
# Set iipsrv environment defaults and execute startup script
3737
ENV HOST="0.0.0.0" PORT="9000" LOGFILE="/dev/stdout" URI_MAP="iiif=>IIIF" VERBOSITY=5 FILESYSTEM_PREFIX="/images/"
38-
ENTRYPOINT run
38+
ENTRYPOINT ["run"]

docker/README

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ To build the Alpine-based stable release for a particular platform (note the tra
3535

3636
docker image build -t iipsrv:stable --build-arg ARCH=amd64/ -f Dockerfile.release ./
3737

38+
To build the Debian-based image with the latest stable release of iipsrv (image size: 134MB):
39+
40+
docker image build -t iipsrv-debian:stable -f Dockerfile.debian-release ./
41+
3842

3943
Starting the iipsrv Docker Container
4044
------------------------------------

0 commit comments

Comments
 (0)