From bda7e1e53d60a0587c74d80bb5247f7f06bbcf3e Mon Sep 17 00:00:00 2001 From: DarthSim Date: Thu, 3 Oct 2019 18:13:06 +0600 Subject: [PATCH] Use golang:1-alpine3.10 for docker build --- .dockerignore | 6 +++--- docker/Dockerfile | 22 ++++++++++++---------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.dockerignore b/.dockerignore index f65b84bf..89298ae2 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,12 +1,12 @@ .DS_Store .git tmp/ +.tmp/ imgproxy -glide.yaml -glide.lock - docs/ +docker/ +examples/ LICENSE README.md CHANGELOG.md diff --git a/docker/Dockerfile b/docker/Dockerfile index 5f45800d..e031230e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,17 +1,15 @@ -FROM alpine:edge +FROM golang:1-alpine3.10 LABEL maintainer="Sergey Alexandrovich " ENV GOPATH /go ENV PATH /usr/local/go/bin:$PATH # Install dependencies -RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \ - && apk --no-cache upgrade \ +RUN apk --no-cache upgrade \ && apk add --no-cache \ curl \ git \ ca-certificates \ - go \ gcc \ g++ \ make \ @@ -27,9 +25,10 @@ RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/reposit librsvg-dev \ libexif-dev \ lcms2-dev \ - libimagequant-dev \ libheif-dev \ - tiff-dev + tiff-dev \ + && apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + libimagequant-dev # Build ImageMagick RUN cd /root \ @@ -49,6 +48,7 @@ RUN cd /root \ --without-bzlib \ --without-dps \ --without-freetype \ + --without-fontconfig \ --without-jbig \ --without-jpeg \ --without-lcms \ @@ -58,6 +58,8 @@ RUN cd /root \ --without-wmf \ --without-xml \ --without-webp \ + --without-heic \ + --without-pango \ && make install-strip # Build libvips @@ -89,11 +91,10 @@ RUN cd /root \ # ================================================================================================== # Final image -FROM alpine:edge +FROM alpine:3.10 LABEL maintainer="Sergey Alexandrovich " -RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \ - && apk --no-cache upgrade \ +RUN apk --no-cache upgrade \ && apk add --no-cache \ bash \ ca-certificates \ @@ -109,9 +110,10 @@ RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/reposit libgsf \ libexif \ lcms2 \ - libimagequant \ libheif \ tiff \ + && apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + libimagequant \ && rm -rf /var/cache/apk* COPY --from=0 /usr/local/bin/imgproxy /usr/local/bin/