Skip to content

Commit b8199ff

Browse files
authored
Merge pull request #3 from samvera-labs/add-webp
Add support for webp
2 parents bce1994 + d0089d4 commit b8199ff

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

Dockerfile

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
# Use AWS Lambda node build environment
1111
FROM public.ecr.aws/sam/build-nodejs16.x:latest
1212

13+
ARG GHOSTSCRIPT_VERSION=9.52 \
14+
LIBVIPS_VERSION=8.12.1
1315
# Update all existing packages
1416
RUN yum update -y
1517

@@ -19,7 +21,7 @@ ENV CFLAGS "-Os"
1921
ENV CXXFLAGS $CFLAGS
2022

2123
# RUN yum groupinstall "Development Tools"
22-
RUN yum install -y tar gzip libjpeg-devel libpng-devel libtiff-devel
24+
RUN yum install -y tar gzip libjpeg-devel libpng-devel libtiff-devel libwebp-devel
2325

2426
###############################################################################
2527
# GhostScript
@@ -28,10 +30,10 @@ RUN yum install -y tar gzip libjpeg-devel libpng-devel libtiff-devel
2830
WORKDIR /root
2931

3032
RUN curl -LO \
31-
https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs952/ghostscript-9.52.tar.gz
32-
RUN tar zxvf ghostscript-9.52.tar.gz
33+
https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs952/ghostscript-${GHOSTSCRIPT_VERSION}.tar.gz
34+
RUN tar zxvf ghostscript-${GHOSTSCRIPT_VERSION}.tar.gz
3335

34-
WORKDIR ghostscript-9.52
36+
WORKDIR /root/ghostscript-${GHOSTSCRIPT_VERSION}
3537
RUN ./configure --prefix=/opt
3638
RUN make install
3739

@@ -43,11 +45,11 @@ WORKDIR /root
4345

4446
RUN yum install -y gtk-doc gobject-introspection-devel expat-devel openjpeg2 openjpeg2-devel openjpeg2-tools
4547

46-
RUN curl -o libvips-8.12.2.tar.gz \
47-
https://codeload.github.com/libvips/libvips/tar.gz/v8.12.2
48-
RUN tar zxvf libvips-8.12.2.tar.gz
48+
RUN curl -o libvips-${LIBVIPS_VERSION}.tar.gz \
49+
https://codeload.github.com/libvips/libvips/tar.gz/v${LIBVIPS_VERSION}
50+
RUN tar zxvf libvips-${LIBVIPS_VERSION}.tar.gz
4951

50-
WORKDIR libvips-8.12.2
52+
WORKDIR /root/libvips-${LIBVIPS_VERSION}
5153
RUN ./autogen.sh --prefix=/opt
5254
RUN ./configure --prefix=/opt
5355
RUN make install
@@ -67,7 +69,7 @@ WORKDIR rpms
6769
# Download dependency RPMs
6870
RUN yumdownloader libjpeg-turbo.x86_64 libpng.x86_64 libtiff.x86_64 \
6971
libgomp.x86_64 libwebp.x86_64 jbigkit-libs.x86_64 openjpeg2.x86_64 \
70-
glib2.x86_64 libmount.x86_64 libblkid.x86_64
72+
glib2.x86_64 libmount.x86_64 libblkid.x86_64 libwebp.x86_64
7173

7274
# Extract RPMs
7375
RUN rpmdev-extract *.rpm

0 commit comments

Comments
 (0)