-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
53 lines (45 loc) · 1.7 KB
/
Dockerfile
File metadata and controls
53 lines (45 loc) · 1.7 KB
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
FROM ubuntu:24.04
LABEL org.opencontainers.image.source="https://github.com/openwatersio/gebco"
LABEL org.opencontainers.image.description="GEBCO bathymetry to vector tile pipeline"
ENV DEBIAN_FRONTEND=noninteractive
# GDAL (with Python bindings for terrain-rgb encoding), jq, and build deps.
RUN apt-get update && apt-get install -y \
gdal-bin \
python3-gdal \
python3-numpy \
python3-pip \
python3-venv \
bc \
jq \
curl \
unzip \
sqlite3 \
build-essential \
libsqlite3-dev \
zlib1g-dev \
git \
imagemagick \
&& rm -rf /var/lib/apt/lists/*
# Install rio-rgbify for Terrain-RGB encoding.
RUN python3 -m venv --system-site-packages /opt/rio-venv \
&& /opt/rio-venv/bin/pip install --no-cache-dir rio-rgbify
ENV PATH="/opt/rio-venv/bin:$PATH"
# Install tippecanoe (Felt fork).
RUN git clone --depth 1 https://github.com/felt/tippecanoe.git /tmp/tippecanoe \
&& cd /tmp/tippecanoe \
&& make -j$(nproc) \
&& make install \
&& rm -rf /tmp/tippecanoe
# Install pmtiles CLI.
RUN ARCH=$(dpkg --print-architecture) \
&& case "${ARCH}" in amd64) ARCH=x86_64;; arm64) ;; *) echo "Unsupported arch: ${ARCH}" && exit 1;; esac \
&& VERSION=$(curl -sL -o /dev/null -w '%{url_effective}' https://github.com/protomaps/go-pmtiles/releases/latest | grep -oE '[^/]+$') \
&& curl -L -o /tmp/go-pmtiles.tar.gz \
"https://github.com/protomaps/go-pmtiles/releases/download/${VERSION}/go-pmtiles_${VERSION#v}_Linux_${ARCH}.tar.gz" \
&& tar -xzf /tmp/go-pmtiles.tar.gz -C /usr/local/bin pmtiles \
&& chmod +x /usr/local/bin/pmtiles \
&& rm /tmp/go-pmtiles.tar.gz
WORKDIR /app
COPY scripts/ /app/scripts/
RUN chmod +x /app/scripts/*
ENTRYPOINT ["/app/scripts/build"]