Skip to content

Commit 98d9d66

Browse files
committed
add libjpeg turbo and png
1 parent e859f2f commit 98d9d66

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

Dockerfile

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LABEL authors="Matthew Hanson <matt.a.hanson@gmail.com>"
66
# install system libraries
77
RUN \
88
yum makecache fast; \
9-
yum install -y wget libpng-devel; \
9+
yum install -y wget libpng-devel nasm; \
1010
yum install -y bash-completion --enablerepo=epel; \
1111
yum clean all; \
1212
yum autoremove
@@ -22,11 +22,13 @@ ENV \
2222
NETCDF_VERSION=4.6.2 \
2323
NGHTTP2_VERSION=1.35.1 \
2424
OPENJPEG_VERSION=2.3.0 \
25+
LIBJPEG_TURBO_VERSION=2.0.1 \
26+
LIBPNG_VERSION=1.6.36 \
2527
PKGCONFIG_VERSION=0.29.2 \
2628
PROJ_VERSION=5.2.0 \
2729
SZIP_VERSION=2.1.1 \
28-
WEBP_VERSION=1.0.0 \
29-
ZSTD_VERSION=1.3.4
30+
WEBP_VERSION=1.0.1 \
31+
ZSTD_VERSION=1.3.8
3032

3133
# Paths to things
3234
ENV \
@@ -153,6 +155,24 @@ RUN \
153155
make -j ${NPROC} install; \
154156
cd ../..; rm -rf openjpeg
155157

158+
# png
159+
RUN \
160+
mkdir png; \
161+
wget -qO- http://prdownloads.sourceforge.net/libpng/libpng-$LIBPNG_VERSION.tar.gz \
162+
| tar xvz -C png --strip-components=1; cd png; \
163+
CFLAGS="-O2 -Wl,-S" ./configure --prefix=$PREFIX; \
164+
make -j $(NPROC) install; \
165+
cd ..; rm -rf png
166+
167+
# jpeg_turbo
168+
RUN \
169+
mkdir jpeg; \
170+
wget -qO- https://github.com/libjpeg-turbo/libjpeg-turbo/archive/${LIBJPEG_TURBO_VERSION}.tar.gz \
171+
| tar xvz -C jpeg --strip-components=1; jpeg; \
172+
cmake -G"Unix Makefiles" -DCMAKE_INSTALL_PREFIX=$PREFIX .; \
173+
make -j $(nproc) install; \
174+
cd ..; rm -rf jpeg
175+
156176
# geotiff
157177
RUN \
158178
mkdir geotiff; \
@@ -179,6 +199,8 @@ RUN \
179199
--with-netcdf=${PREFIX} \
180200
--with-webp=${PREFIX} \
181201
--with-zstd=${PREFIX} \
202+
--with-jpeg=${PREFIX} \
203+
--with-png=${PREFIX} \
182204
--with-threads=yes \
183205
--with-curl=${PREFIX}/bin/curl-config \
184206
--without-python \

0 commit comments

Comments
 (0)