Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added webp support #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ FROM lambci/lambda-base:build

RUN yum update -y

RUN yum install -y libpng-devel libjpeg-devel libtiff-devel libuuid-devel gcc
RUN yum install -y libpng-devel libjpeg-devel libtiff-devel libuuid-devel gcc libwebp libwebp-dev libwebp-tools libwebp-devel

ARG GM_VERSION

RUN curl https://versaweb.dl.sourceforge.net/project/graphicsmagick/graphicsmagick/${GM_VERSION}/GraphicsMagick-${GM_VERSION}.tar.xz | tar -xJ && \
cd GraphicsMagick-${GM_VERSION} && \
./configure --prefix=/opt --enable-shared=no --enable-static=yes --with-gs-font-dir=/opt/share/fonts/default/Type1 && \
./configure --prefix=/opt --enable-shared=no --enable-static=yes --with-gs-font-dir=/opt/share/fonts/default/Type1 --with-webp && \
make && \
make install

Expand All @@ -28,7 +28,8 @@ RUN cp /usr/lib64/liblcms2.so* /opt/lib && \
cp /usr/lib64/libxcb.so* /opt/lib && \
cp /usr/lib64/libXau.so* /opt/lib && \
cp /usr/lib64/libuuid.so /opt/lib/libuuid.so.1 && \
cp /usr/lib64/libbz2.so /opt/lib/libbz2.so.1
cp /usr/lib64/libbz2.so /opt/lib/libbz2.so.1 && \
cp /usr/lib64/libwebp* /opt/lib

RUN mkdir -p /opt/share/fonts/default && \
cp -R /usr/share/fonts/default/Type1 /opt/share/fonts/default/Type1
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

export GM_VERSION=1.3.31
export GM_VERSION=1.3.36

docker build --build-arg GM_VERSION -t gm-lambda-layer .
docker run --rm gm-lambda-layer cat /tmp/gm-${GM_VERSION}.zip > ./layer.zip