Skip to content

Instantly share code, notes, and snippets.

@janaz
Last active January 25, 2022 03:55
Show Gist options
  • Save janaz/df08546189dbb885a075 to your computer and use it in GitHub Desktop.
Save janaz/df08546189dbb885a075 to your computer and use it in GitHub Desktop.
sharp - dockerfile
FROM ubuntu:14.04
ENV DEBIAN_FRONTEND noninteractive
RUN echo "System updated on 2015-06-25" && apt-get update && apt-get -y dist-upgrade
# Install dependencies
RUN \
apt-get install -y \
automake build-essential curl\
gobject-introspection gtk-doc-tools libglib2.0-dev libjpeg-turbo8-dev libpng12-dev libwebp-dev libtiff5-dev libexif-dev libxml2-dev swig libmagickwand-dev
RUN apt-get install -y nasm
# Build mozjpeg
WORKDIR /tmp
RUN curl -O -L https://github.com/mozilla/mozjpeg/archive/v3.1.tar.gz && \
tar zvxf v3.1.tar.gz && \
cd mozjpeg-3.1 && \
autoreconf -fiv && \
./configure && \
make && \
make install prefix=/usr/local libdir=/usr/local/lib64 && \
ldconfig && \
rm -rf /tmp/*
# Build libvips
WORKDIR /tmp
ENV LIBVIPS_VERSION_MAJOR 8
ENV LIBVIPS_VERSION_MINOR 0
ENV LIBVIPS_VERSION_PATCH 2
ENV LIBVIPS_VERSION $LIBVIPS_VERSION_MAJOR.$LIBVIPS_VERSION_MINOR.$LIBVIPS_VERSION_PATCH
RUN \
curl -O http://www.vips.ecs.soton.ac.uk/supported/$LIBVIPS_VERSION_MAJOR.$LIBVIPS_VERSION_MINOR/vips-$LIBVIPS_VERSION.tar.gz && \
tar zvxf vips-$LIBVIPS_VERSION.tar.gz && \
cd vips-$LIBVIPS_VERSION && \
./configure --with-magick --with-webp --enable-debug=no --enable-docs=no --without-python --without-orc --without-fftw --without-gsf --with-jpeg-includes=/usr/local/include/ --with-jpeg-libraries=/usr/local/lib64/ && \
make && \
make install && \
ldconfig && \
rm -rf /tmp/*
ENV NODE_VERSION 0.12.5
RUN curl -L -o - https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz | tar xzvf - -C /
ENV PATH /node-v$NODE_VERSION-linux-x64/bin:$PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment