[Tile-serving] [openstreetmap/osm2pgsql] add support for dockerfile build (#1427)
Stephan
notifications at github.com
Fri Mar 12 09:02:21 UTC 2021
Not certain why you need all these layers. It doesn't matter if you throw away the temporary image. Otherwise you could combine the RUN lines.
My build was only interested in the artifact, so I had another entry to create later a versioned image only containing osm2pgsql.
For inspiration, here my file:
```
FROM osmtools/builder as builder
WORKDIR /
ARG DEBIAN_FRONTEND=noninteractive
ARG CLICOLOR_FORCE=1
ENV TZ=Europe/Berlin
ARG VERSION=master
RUN git clone --depth 1 --branch $VERSION git://github.com/openstreetmap/osm2pgsql.git \
&& mkdir osm2pgsql/build && cd osm2pgsql/build && cmake -D WITH_LUAJIT=ON -D CMAKE_BUILD_TYPE=MinSizeRel .. && make -j$(nproc)
FROM scratch
WORKDIR /
COPY --from=builder /osm2pgsql/build/osm2pgsql /build/
```
I call it like:
```
OSM2PGSQL_VERSION=1.4.1
docker build --pull -t osmtools/osm2pgsql:"$OSM2PGSQL_VERSION" --build-arg VERSION="$OSM2PGSQL_VERSION" osm2pgsql
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1427#issuecomment-797344202
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20210312/5eb616f2/attachment-0001.htm>
More information about the Tile-serving
mailing list