Skip to content

Commit 4f547d8

Browse files
authored
AP-589: rebuild image based on iipsrv 1.3 (#7)
* build iipsrv 1.3 by default; parameterize build, too * Update test and README for iipsrv 1.3 * upload build artifacts * document build arguments
1 parent c22f37d commit 4f547d8

5 files changed

Lines changed: 71 additions & 26 deletions

File tree

.github/workflows/build.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,21 @@ jobs:
142142
run: |
143143
docker compose exec app test/test.sh
144144
145+
- name: Copy out artifacts
146+
if: ${{ always() }}
147+
run: |
148+
docker compose cp app:/opt/app/artifacts ./
149+
docker compose logs > artifacts/docker-compose-services.log
150+
docker compose config > artifacts/docker-compose.merged.yml
151+
152+
- name: Upload the test report
153+
if: ${{ always() }}
154+
uses: actions/upload-artifact@v4
155+
with:
156+
name: iipsrv Build Report (${{ github.run_id }}_${{ github.run_attempt }})
157+
path: artifacts/*
158+
if-no-files-found: error
159+
145160
push:
146161
runs-on: ubuntu-latest
147162
needs:

Dockerfile

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# =============================================================================
2+
#
3+
# These ARGs are used to determine the version of IIPImage to
4+
# build. IIPSRV_BUILD_REF is intended to map to a Git tag or
5+
# branch.
6+
ARG IIPSRV_VERSION="1.3"
7+
ARG IIPSRV_BUILD_REF="iipsrv-${IIPSRV_VERSION:-1.3}"
8+
19
# =============================================================================
210
# Target: base
311
#
@@ -23,6 +31,7 @@ ENV LOGFILE=/dev/stdout
2331
RUN apt-get update && \
2432
apt-get install -y --no-install-recommends \
2533
libgomp1 \
34+
libwebpmux3 \
2635
spawn-fcgi
2736

2837
# ==============================
@@ -49,6 +58,8 @@ CMD ["./iipsrv-entrypoint.sh"]
4958

5059
FROM base AS development
5160

61+
ARG IIPSRV_BUILD_REF
62+
5263
# ==============================
5364
# Install development tools
5465

@@ -66,10 +77,10 @@ RUN apt-get install -y --no-install-recommends \
6677

6778
# Clone iipsrv repo
6879
WORKDIR /tmp
69-
RUN git clone --depth 1 --branch iipsrv-1.1 https://github.com/ruven/iipsrv
80+
RUN git clone --depth 1 --branch "${IIPSRV_BUILD_REF}" https://github.com/ruven/iipsrv
7081

7182
# Build iipsrv binary
72-
WORKDIR iipsrv
83+
WORKDIR /tmp/iipsrv
7384
RUN ./autogen.sh && \
7485
./configure && \
7586
make

README.md

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
A single-container deployment of [IIPImage](https://iipimage.sourceforge.io),
44
running on [nginx](http://nginx.org/en/) with FastCGI.
55

6-
(Forked from [iiip-nginx-single](https://git.lib.berkeley.edu/lap/iiip-nginx-single).)
7-
86
## Configuration
97

108
When using this image, either on its own or with the included
@@ -20,6 +18,13 @@ environment variables:
2018
See the [IIPImage docs](https://iipimage.sourceforge.io/documentation/server/#configuration)
2119
for a full list of environment variables.
2220

21+
In addition, the Dockerfile uses the `IIPSRV_VERSION` and `IIPSRV_BUILD_REF`
22+
build arguments to specify the version of IIPImage to compile for the image.
23+
`IIP_VERSION` assumes Git tags of the format `iipsrv-${IIP_VERSION}` are
24+
being created upstream; `IIPSRV_BUILD_REF` is used to specify an alternate
25+
branch or tag name that may not be in this format.
26+
27+
2328
## Notes for developers
2429

2530
### Default development configuration
@@ -41,7 +46,7 @@ Note that nginx/IIPImage runs on port 80, and is exposed on host port 80.
4146
By default, the [`iipsrv-entrypoint.sh`](iipsrv-entrypoint.sh) script will
4247
cause files to be served from the `test/data` directory.
4348

44-
You can override this mount by passing a `$FILESYSTEM` value to
49+
You can override this mount by passing a `$FILESYSTEM_PREFIX` value to
4550
the container; see below under ["Custom configuration"](#custom-configuration).
4651

4752
#### Testing
@@ -53,13 +58,12 @@ To test that the container has come up correctly, using the image file
5358
curl -v 'http://localhost/iiif/test.tif/info.json'
5459
```
5560

56-
This should produce a IIIF [information response](https://iiif.io/api/image/2.0/#information-request)
61+
This should produce a IIIF [information response](https://iiif.io/api/image/3.0/#51-image-information-request)
5762
in JSON format, e.g.:
5863

5964
```json
6065
{
61-
"@context" : "http://iiif.io/api/image/2/context.json",
62-
"@id" : "http://localhost/iiif/test.tif",
66+
"@context" : "http://iiif.io/api/image/3/context.json",
6367
"protocol" : "http://iiif.io/api/image",
6468
"width" : 2769,
6569
"height" : 3855,
@@ -72,15 +76,23 @@ in JSON format, e.g.:
7276
"tiles" : [
7377
{ "width" : 256, "height" : 256, "scaleFactors" : [ 1, 2, 4, 8, 16 ] }
7478
],
75-
"profile" : [
76-
"http://iiif.io/api/image/2/level1.json",
77-
{ "formats" : [ "jpg" ],
78-
"qualities" : [ "native","color","gray","bitonal" ],
79-
"supports" : ["regionByPct","regionSquare","sizeByForcedWh","sizeByWh","sizeAboveFull","rotationBy90s","mirroring"],
80-
"maxWidth" : 5000,
81-
"maxHeight" : 5000
82-
}
79+
"id" : "http://localhost/iiif/test.tif",
80+
"type": "ImageService3",
81+
"profile" : "level1",
82+
"maxWidth" : 5000,
83+
"maxHeight" : 5000,
84+
"extraQualities": ["color","gray","bitonal"],
85+
"extraFormats": ["tif","webp"],
86+
"extraFeatures": ["regionByPct","sizeByPct","sizeByConfinedWh","sizeUpscaling","rotationBy90s","mirroring"],
87+
"service": [
88+
{
89+
"@context": "http://iiif.io/api/annex/services/physdim/1/context.json",
90+
"profile": "http://iiif.io/api/annex/services/physdim",
91+
"physicalScale": 0.00846667,
92+
"physicalUnits": "cm"
93+
}
8394
]
95+
8496
}
8597
```
8698

test/default.jpg

-11 Bytes
Loading

test/info.json

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
"@context" : "http://iiif.io/api/image/2/context.json",
3-
"@id" : "http://localhost/iiif/test.tif",
2+
"@context" : "http://iiif.io/api/image/3/context.json",
43
"protocol" : "http://iiif.io/api/image",
54
"width" : 2769,
65
"height" : 3855,
@@ -13,13 +12,21 @@
1312
"tiles" : [
1413
{ "width" : 256, "height" : 256, "scaleFactors" : [ 1, 2, 4, 8, 16 ] }
1514
],
16-
"profile" : [
17-
"http://iiif.io/api/image/2/level1.json",
18-
{ "formats" : [ "jpg" ],
19-
"qualities" : [ "native","color","gray","bitonal" ],
20-
"supports" : ["regionByPct","regionSquare","sizeByForcedWh","sizeByWh","sizeAboveFull","rotationBy90s","mirroring"],
21-
"maxWidth" : 5000,
22-
"maxHeight" : 5000
23-
}
15+
"id" : "http://localhost/iiif/test.tif",
16+
"type": "ImageService3",
17+
"profile" : "level1",
18+
"maxWidth" : 5000,
19+
"maxHeight" : 5000,
20+
"extraQualities": ["color","gray","bitonal"],
21+
"extraFormats": ["tif","webp"],
22+
"extraFeatures": ["regionByPct","sizeByPct","sizeByConfinedWh","sizeUpscaling","rotationBy90s","mirroring"],
23+
"service": [
24+
{
25+
"@context": "http://iiif.io/api/annex/services/physdim/1/context.json",
26+
"profile": "http://iiif.io/api/annex/services/physdim",
27+
"physicalScale": 0.00846667,
28+
"physicalUnits": "cm"
29+
}
2430
]
31+
2532
}

0 commit comments

Comments
 (0)