Skip to content

Commit

Permalink
docker: install ccache+rsync early
Browse files Browse the repository at this point in the history
Hoist the installation of ccache and
rsync into one of the early blocks
in all images. This ensures that
the ccache binary is available
for everything built.
  • Loading branch information
pjonsson committed Oct 9, 2024
1 parent a9a0793 commit dfef18d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docker/alpine-normal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ RUN apk add --no-cache \
py3-setuptools \
python3-dev \
qhull-dev \
rsync \
sfcgal-dev \
snappy-dev \
sqlite-dev \
Expand Down Expand Up @@ -140,7 +141,6 @@ RUN if test "${OPENDRIVE_VERSION}" != ""; then ( \
&& rm -rf libOpenDRIVE-${OPENDRIVE_VERSION} \
); fi

RUN apk add --no-cache rsync ccache
ARG RSYNC_REMOTE
ARG WITH_CCACHE

Expand Down
8 changes: 5 additions & 3 deletions docker/alpine-small/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ RUN apk add --no-cache wget curl unzip make libtool autoconf automake pkgconfig

# For PROJ and GDAL
RUN apk add --no-cache \
ccache \
cmake ninja-build \
linux-headers \
curl-dev tiff-dev \
zlib-dev zstd-dev lz4-dev libdeflate-dev libarchive-dev \
libjpeg-turbo-dev libpng-dev libwebp-dev expat-dev postgresql-dev openjpeg-dev
libjpeg-turbo-dev libpng-dev libwebp-dev expat-dev \
postgresql-dev \
rsync \
openjpeg-dev

# Ninja is not in the default path on Alpine.
ENV PATH=/usr/lib/ninja-build/bin:$PATH
Expand All @@ -47,8 +51,6 @@ RUN if test "${OPENJPEG_VERSION}" != ""; then ( \
&& rm -rf openjpeg-${OPENJPEG_VERSION} \
); fi

RUN apk add --no-cache rsync ccache

ARG PROJ_DATUMGRID_LATEST_LAST_MODIFIED
RUN \
mkdir -p /build_projgrids/usr/share/proj \
Expand Down
6 changes: 2 additions & 4 deletions docker/ubuntu-full/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ USER root
RUN . /buildscripts/bh-set-envvars.sh \
&& apt-get update -y \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --fix-missing --no-install-recommends \
build-essential ca-certificates \
build-essential ca-certificates ccache\
git make ninja-build cmake wget unzip libtool automake \
zlib1g-dev${APT_ARCH_SUFFIX} libsqlite3-dev${APT_ARCH_SUFFIX} pkg-config sqlite3 libcurl4-openssl-dev${APT_ARCH_SUFFIX} \
libtiff-dev${APT_ARCH_SUFFIX} \
rsync \
&& rm -rf /var/lib/apt/lists/*

ARG JAVA_VERSION=17
Expand Down Expand Up @@ -275,9 +276,6 @@ RUN . /buildscripts/bh-set-envvars.sh \
&& rm -rf /var/lib/apt/lists/* \
&& rm apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb

RUN apt-get update -y \
&& apt-get install -y --fix-missing --no-install-recommends rsync ccache \
&& rm -rf /var/lib/apt/lists/*
ARG RSYNC_REMOTE
ARG WITH_CCACHE

Expand Down
6 changes: 2 additions & 4 deletions docker/ubuntu-small/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ USER root
RUN . /buildscripts/bh-set-envvars.sh \
&& apt-get update -y \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --fix-missing --no-install-recommends \
build-essential ca-certificates \
build-essential ca-certificates ccache \
git make ninja-build cmake wget unzip libtool automake \
zlib1g-dev${APT_ARCH_SUFFIX} libsqlite3-dev${APT_ARCH_SUFFIX} pkg-config sqlite3 libcurl4-openssl-dev${APT_ARCH_SUFFIX} \
libtiff-dev${APT_ARCH_SUFFIX} \
rsync \
&& rm -rf /var/lib/apt/lists/*

# Setup build env for GDAL
Expand Down Expand Up @@ -93,9 +94,6 @@ RUN \
&& unzip -q -j -u -o proj-datumgrid-latest.zip -d /build_projgrids/${PROJ_INSTALL_PREFIX}/share/proj \
&& rm -f *.zip

RUN apt-get update -y \
&& apt-get install -y --fix-missing --no-install-recommends rsync ccache \
&& rm -rf /var/lib/apt/lists/*
ARG RSYNC_REMOTE
ARG WITH_CCACHE

Expand Down

0 comments on commit dfef18d

Please sign in to comment.