forked from gographics/imagick
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (26 loc) · 857 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM golang:1.11
# Ignore APT warnings about not having a TTY
ENV DEBIAN_FRONTEND noninteractive
# install build essentials
RUN apt-get update && \
apt-get install -y wget build-essential pkg-config --no-install-recommends
# Install ImageMagick deps
RUN apt-get -q -y install libjpeg-dev libpng-dev libtiff-dev \
libgif-dev libx11-dev --no-install-recommends
ENV IMAGEMAGICK_VERSION=6.9.10-11
RUN cd && \
wget https://github.com/ImageMagick/ImageMagick6/archive/${IMAGEMAGICK_VERSION}.tar.gz && \
tar xvzf ${IMAGEMAGICK_VERSION}.tar.gz && \
cd ImageMagick* && \
./configure \
--without-magick-plus-plus \
--without-perl \
--disable-openmp \
--with-gvc=no \
--disable-docs && \
make -j$(nproc) && make install && \
ldconfig /usr/local/lib
WORKDIR /go/projects/resizer
COPY . .
RUN go install
CMD /go/bin/resizer