Skip to content

Commit 0b0c75b

Browse files
committed
replace NL dockerfile with a build target
1 parent 9d43cf4 commit 0b0c75b

File tree

5 files changed

+27
-23
lines changed

5 files changed

+27
-23
lines changed

.github/workflows/build-and-publish-image.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ jobs:
4949
with:
5050
push: true
5151
tags: ${{ steps.docker_meta.outputs.tags }}-nl
52-
file: ${{context}}/Dockerfile.NL
52+
file: ${{context}}/Dockerfile
53+
target: NL
5354
labels: ${{ steps.docker_meta.outputs.labels }}
5455
cache-from: type=local,src=/tmp/.buildx-cache
5556
cache-to: type=local,dest=/tmp/.buildx-cache-new

Dockerfile

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,4 +199,24 @@ ENV IDLE_TIMEOUT 20
199199

200200
EXPOSE 80
201201

202-
CMD ["lighttpd", "-D", "-f", "/srv/mapserver/config/lighttpd.conf"]
202+
CMD ["lighttpd", "-D", "-f", "/srv/mapserver/config/lighttpd.conf"]
203+
204+
FROM service AS NL
205+
206+
USER root
207+
RUN wget https://github.com/OSGeo/PROJ-data/releases/download/1.15.0/proj-data-1.15.tar.gz
208+
209+
RUN mkdir proj-data-1.15 && \
210+
tar xzvf proj-data-1.15.tar.gz -C /proj-data-1.15 && \
211+
cp /proj-data-1.15/*.* /usr/local/share/proj/ && \
212+
rm -rf proj-datumgrid*
213+
214+
COPY --from=osgeo/proj:9.3.0 /usr/share/proj/proj.db /usr/local/share/proj/proj.db
215+
216+
COPY ./null /usr/local/share/proj/null
217+
218+
RUN chown root root /usr/local/share/proj/*
219+
220+
USER www
221+
222+
FROM service AS default

Dockerfile.NL

Lines changed: 0 additions & 17 deletions
This file was deleted.

ETRS89andRDNAP/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ docker run --rm -p 80:80 --name rdnap -v `pwd`/ETRS89andRDNAP:/srv/data -e DEBUG
1313
## 8.0.0-lighttpd
1414

1515
```docker
16-
docker build -f Dockerfile.NL -t pdok/mapserver:8.0.0-lighttpd-nl .
16+
docker build --target NL -t pdok/mapserver:8.0.0-lighttpd-nl .
1717
```
1818

1919
```docker

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ For a specific Dutch version which includes a specific (and smaller) epsg file
9797
and necessary grid corrections files.
9898

9999
```shell
100-
docker build -t pdok/mapserver:nl -f Dockerfile.NL .
100+
docker build -t pdok/mapserver:nl --target=NL .
101101
```
102102

103103
### Run
@@ -164,8 +164,8 @@ of ways through this setup.
164164

165165
### base image
166166

167-
The best example for this is the [Dockerfile.NL](/Dockerfile.NL) in this
168-
repository. This Dockerfile uses the main Dockerfile as a base image copies
167+
The best example for this is the [Dockerfile NL target](./Dockerfile) in this
168+
repository. This uses the main layer ("service") as a base, copies
169169
specific geodetic grid files and overwrites the default espg with a tuned one
170170
for the Netherlands.
171171

0 commit comments

Comments
 (0)