Skip to content

Commit 856338e

Browse files
committed
remove clean
1 parent 98ceb92 commit 856338e

File tree

4 files changed

+41
-20
lines changed

4 files changed

+41
-20
lines changed

gdal2.4/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ RUN mkdir /tmp/proj \
1111
&& curl -sfL http://download.osgeo.org/proj/proj-$PROJ_VERSION.tar.gz | tar zxf - -C /tmp/proj --strip-components=1 \
1212
&& cd /tmp/proj \
1313
&& LDFLAGS="-Wl,-rpath,'\$\$ORIGIN'" CFLAGS="-O2 -Wl,-S" CXXFLAGS="-O2 -Wl,-S" ./configure --prefix=$PREFIX --disable-static --enable-lto \
14-
&& make -j $(nproc) --silent && make install && make clean \
14+
&& make -j $(nproc) --silent && make install \
1515
&& rm -rf /tmp/proj
1616

1717
# geos
1818
RUN mkdir /tmp/geos \
1919
&& curl -sfL http://download.osgeo.org/geos/geos-$GEOS_VERSION.tar.bz2 | tar jxf - -C /tmp/geos --strip-components=1 \
2020
&& cd /tmp/geos \
2121
&& CFLAGS="-O2 -Wl,-S" CXXFLAGS="-O2 -Wl,-S" ./configure --prefix=$PREFIX --disable-static \
22-
&& make -j $(nproc) --silent && make install && make clean \
22+
&& make -j $(nproc) --silent && make install \
2323
&& rm -rf /tmp/geos
2424

2525
ENV PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/
@@ -71,7 +71,7 @@ RUN cd /tmp/gdal \
7171
--without-pcidsk
7272

7373
RUN cd /tmp/gdal \
74-
&& make -j $(nproc) --silent && make install && make clean \
74+
&& make -j $(nproc) --silent && make install \
7575
&& rm -rf /tmp/gdal
7676

7777
# from https://github.com/pypa/manylinux/blob/d8ef5d47433ba771fa4403fd48f352c586e06e43/docker/build_scripts/build.sh#L133-L138
@@ -80,7 +80,7 @@ ENV PATCHELF_VERSION 0.10
8080
RUN mkdir /tmp/patchelf \
8181
&& curl -sfL https://github.com/NixOS/patchelf/archive/$PATCHELF_VERSION.tar.gz | tar zxf - -C /tmp/patchelf --strip-components=1 \
8282
&& cd /tmp/patchelf && ./bootstrap.sh && ./configure \
83-
&& make -j $(nproc) --silent && make install && make clean \
83+
&& make -j $(nproc) --silent && make install \
8484
&& cd / && rm -rf /tmp/patchelf
8585

8686
# Move /lib64 (libjpeg) to /lib

gdal3.1/Dockerfile

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN mkdir /tmp/libtiff \
1212
&& curl -sfL https://download.osgeo.org/libtiff/tiff-${LIBTIFF_VERSION}.tar.gz | tar zxf - -C /tmp/libtiff --strip-components=1 \
1313
&& cd /tmp/libtiff \
1414
&& CFLAGS="-O2 -Wl,-S" CXXFLAGS="-O2 -Wl,-S" ./configure --prefix=$PREFIX \
15-
&& make -j $(nproc) --silent && make install && make clean \
15+
&& make -j $(nproc) --silent && make install \
1616
&& rm -rf /tmp/libtiff
1717

1818
# proj
@@ -21,15 +21,15 @@ RUN mkdir /tmp/proj && mkdir /tmp/proj/data \
2121
&& curl -sfL http://download.osgeo.org/proj/proj-datumgrid-latest.tar.gz | tar zxf - -C /tmp/proj/data \
2222
&& cd /tmp/proj \
2323
&& LDFLAGS="-Wl,-rpath,'\$\$ORIGIN'" CFLAGS="-O2 -Wl,-S" CXXFLAGS="-O2 -Wl,-S" ./configure --prefix=$PREFIX --disable-static --enable-lto \
24-
&& make -j $(nproc) --silent && make install && make clean \
24+
&& make -j $(nproc) --silent && make install \
2525
&& rm -rf /tmp/proj
2626

2727
# geos
2828
RUN mkdir /tmp/geos \
2929
&& curl -sfL http://download.osgeo.org/geos/geos-$GEOS_VERSION.tar.bz2 | tar jxf - -C /tmp/geos --strip-components=1 \
3030
&& cd /tmp/geos \
3131
&& CFLAGS="-O2 -Wl,-S" CXXFLAGS="-O2 -Wl,-S" ./configure --prefix=$PREFIX --disable-static \
32-
&& make -j $(nproc) --silent && make install && make clean \
32+
&& make -j $(nproc) --silent && make install \
3333
&& rm -rf /tmp/geos
3434

3535
ENV PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/
@@ -67,7 +67,6 @@ RUN cd /tmp/gdal \
6767
--with-xml2=yes \
6868
--with-webp=$PREFIX \
6969
--with-zstd=$PREFIX \
70-
--disable-driver-bsb \
7170
--without-cfitsio \
7271
--without-ecw \
7372
--without-fme \
@@ -78,10 +77,21 @@ RUN cd /tmp/gdal \
7877
--without-lerc \
7978
--without-libtool \
8079
--without-pcraster \
81-
--without-pcidsk
80+
--without-pcidsk \
81+
--disable-all-optional-drivers \
82+
--enable-driver-shape \
83+
--enable-driver-gpkg \
84+
--enable-driver-sentinel2 \
85+
--enable-driver-xyz \
86+
--enable-driver-flatgeobuf \
87+
--enable-driver-mvt \
88+
--enable-driver-wmts \
89+
--enable-driver-wms \
90+
--enable-driver-mbtiles \
91+
--enable-driver-gpkg
8292

8393
RUN cd /tmp/gdal \
84-
&& make -j $(nproc) --silent && make install && make clean \
94+
&& make -j $(nproc) --silent && make install \
8595
&& rm -rf /tmp/gdal
8696

8797
# from https://github.com/pypa/manylinux/blob/d8ef5d47433ba771fa4403fd48f352c586e06e43/docker/build_scripts/build.sh#L133-L138
@@ -90,7 +100,7 @@ ENV PATCHELF_VERSION 0.10
90100
RUN mkdir /tmp/patchelf \
91101
&& curl -sfL https://github.com/NixOS/patchelf/archive/$PATCHELF_VERSION.tar.gz | tar zxf - -C /tmp/patchelf --strip-components=1 \
92102
&& cd /tmp/patchelf && ./bootstrap.sh && ./configure \
93-
&& make -j $(nproc) --silent && make install && make clean \
103+
&& make -j $(nproc) --silent && make install \
94104
&& cd / && rm -rf /tmp/patchelf
95105

96106
# Move /lib64 (libjpeg) to /lib

gdal3.2/Dockerfile

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN mkdir /tmp/libtiff \
1212
&& curl -sfL https://download.osgeo.org/libtiff/tiff-${LIBTIFF_VERSION}.tar.gz | tar zxf - -C /tmp/libtiff --strip-components=1 \
1313
&& cd /tmp/libtiff \
1414
&& CFLAGS="-O2 -Wl,-S" CXXFLAGS="-O2 -Wl,-S" ./configure --prefix=$PREFIX \
15-
&& make -j $(nproc) --silent && make install && make clean \
15+
&& make -j $(nproc) --silent && make install \
1616
&& rm -rf /tmp/libtiff
1717

1818
# proj
@@ -21,15 +21,15 @@ RUN mkdir /tmp/proj && mkdir /tmp/proj/data \
2121
&& curl -sfL http://download.osgeo.org/proj/proj-datumgrid-latest.tar.gz | tar zxf - -C /tmp/proj/data \
2222
&& cd /tmp/proj \
2323
&& LDFLAGS="-Wl,-rpath,'\$\$ORIGIN'" CFLAGS="-O2 -Wl,-S" CXXFLAGS="-O2 -Wl,-S" ./configure --prefix=$PREFIX --disable-static --enable-lto \
24-
&& make -j $(nproc) --silent && make install && make clean \
24+
&& make -j $(nproc) --silent && make install \
2525
&& rm -rf /tmp/proj
2626

2727
# geos
2828
RUN mkdir /tmp/geos \
2929
&& curl -sfL http://download.osgeo.org/geos/geos-$GEOS_VERSION.tar.bz2 | tar jxf - -C /tmp/geos --strip-components=1 \
3030
&& cd /tmp/geos \
3131
&& CFLAGS="-O2 -Wl,-S" CXXFLAGS="-O2 -Wl,-S" ./configure --prefix=$PREFIX --disable-static \
32-
&& make -j $(nproc) --silent && make install && make clean \
32+
&& make -j $(nproc) --silent && make install \
3333
&& rm -rf /tmp/geos
3434

3535
ENV PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/
@@ -67,7 +67,6 @@ RUN cd /tmp/gdal \
6767
--with-xml2=yes \
6868
--with-webp=$PREFIX \
6969
--with-zstd=$PREFIX \
70-
--disable-driver-bsb \
7170
--without-cfitsio \
7271
--without-ecw \
7372
--without-fme \
@@ -79,10 +78,20 @@ RUN cd /tmp/gdal \
7978
--without-libtool \
8079
--without-pcraster \
8180
--without-pcidsk \
82-
--disable-driver-elastic
81+
--disable-all-optional-drivers \
82+
--enable-driver-shape \
83+
--enable-driver-gpkg \
84+
--enable-driver-sentinel2 \
85+
--enable-driver-xyz \
86+
--enable-driver-flatgeobuf \
87+
--enable-driver-mvt \
88+
--enable-driver-wmts \
89+
--enable-driver-wms \
90+
--enable-driver-mbtiles \
91+
--enable-driver-gpkg
8392

8493
RUN cd /tmp/gdal \
85-
&& make -j $(nproc) --silent && make install && make clean \
94+
&& make -j $(nproc) --silent && make install \
8695
&& rm -rf /tmp/gdal
8796

8897
# from https://github.com/pypa/manylinux/blob/d8ef5d47433ba771fa4403fd48f352c586e06e43/docker/build_scripts/build.sh#L133-L138
@@ -91,7 +100,7 @@ ENV PATCHELF_VERSION 0.10
91100
RUN mkdir /tmp/patchelf \
92101
&& curl -sfL https://github.com/NixOS/patchelf/archive/$PATCHELF_VERSION.tar.gz | tar zxf - -C /tmp/patchelf --strip-components=1 \
93102
&& cd /tmp/patchelf && ./bootstrap.sh && ./configure \
94-
&& make -j $(nproc) --silent && make install && make clean \
103+
&& make -j $(nproc) --silent && make install \
95104
&& cd / && rm -rf /tmp/patchelf
96105

97106
# Move /lib64 (libjpeg) to /lib

scripts/build.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ IMAGE_VERSION=$1
44
GDAL_VERSION=$2
55
RUNTIME=$3
66

7+
LAMBDA_VERSION=$(echo $IMAGE_VERSION | sed -E 's/base(-)?//g')
8+
79
echo "Building image for Amazonlinux ${IMAGE_VERSION} | GDAL: ${GDAL_VERSION} | Runtime: ${RUNTIME}"
810

911
# Base Image
@@ -12,9 +14,9 @@ docker build -f common/${IMAGE_VERSION}/Dockerfile -t ${IMAGE_VERSION}:build .
1214
docker build \
1315
--build-arg IMAGE_VERSION=${IMAGE_VERSION} \
1416
-f gdal${GDAL_VERSION}/Dockerfile \
15-
-t lambgeo/${IMAGE_VERSION}-gdal:${GDAL_VERSION} .
17+
-t lambgeo/lambda${LAMBDA_VERSION}-gdal:${GDAL_VERSION} .
1618

1719
docker build \
1820
--build-arg GDAL_VERSION=${GDAL_VERSION} \
1921
-f runtimes/${RUNTIME} \
20-
-t lambgeo/${IMAGE_VERSION}-gdal:${GDAL_VERSION}-${RUNTIME} .
22+
-t lambgeo/lambda${LAMBDA_VERSION}-gdal:${GDAL_VERSION}-${RUNTIME} .

0 commit comments

Comments
 (0)