mirror of
https://github.com/imgproxy/imgproxy.git
synced 2024-11-24 08:12:38 +02:00
Change Docker image base to Debian 10
This commit is contained in:
parent
3123d44692
commit
49aaecf464
@ -4,6 +4,9 @@
|
|||||||
### Added
|
### Added
|
||||||
- `IMGPROXY_LOG_LEVEL` config.
|
- `IMGPROXY_LOG_LEVEL` config.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Docker image base is changed to Debian 10 for better stability and performance.
|
||||||
|
|
||||||
## [2.7.0] - 2019-11-13
|
## [2.7.0] - 2019-11-13
|
||||||
### Changed
|
### Changed
|
||||||
- Boolean processing options such as `enlarge` and `extend` are properly parsed. `1`, `t`, `TRUE`, `true`, `True` are truthy, `0`, `f`, `F`, `FALSE`, `false`, `False` are falsy. All other values are treated as falsy and generate a warning message.
|
- Boolean processing options such as `enlarge` and `extend` are properly parsed. `1`, `t`, `TRUE`, `true`, `True` are truthy, `0`, `f`, `F`, `FALSE`, `false`, `False` are falsy. All other values are treated as falsy and generate a warning message.
|
||||||
|
@ -1,34 +1,30 @@
|
|||||||
FROM golang:1-alpine3.10
|
FROM golang:1-buster
|
||||||
LABEL maintainer="Sergey Alexandrovich <darthsim@gmail.com>"
|
LABEL maintainer="Sergey Alexandrovich <darthsim@gmail.com>"
|
||||||
|
|
||||||
ENV GOPATH /go
|
ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig
|
||||||
ENV PATH /usr/local/go/bin:$PATH
|
ENV LD_LIBRARY_PATH /lib64:/usr/lib64:/usr/local/lib
|
||||||
|
ENV CGO_LDFLAGS_ALLOW "-s|-w"
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN apk --no-cache upgrade \
|
RUN apt-get update \
|
||||||
&& apk add --no-cache \
|
&& apt-get install -y --no-install-recommends \
|
||||||
curl \
|
curl \
|
||||||
git \
|
git \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
gcc \
|
build-essential \
|
||||||
g++ \
|
|
||||||
make \
|
|
||||||
musl-dev \
|
|
||||||
fftw-dev \
|
|
||||||
glib-dev \
|
|
||||||
libtool \
|
libtool \
|
||||||
expat-dev \
|
libfftw3-dev \
|
||||||
libjpeg-turbo-dev \
|
libglib2.0-dev \
|
||||||
|
libexpat1-dev \
|
||||||
|
libjpeg62-turbo-dev \
|
||||||
libpng-dev \
|
libpng-dev \
|
||||||
libwebp-dev \
|
libwebp-dev \
|
||||||
librsvg-dev \
|
libgif-dev \
|
||||||
|
librsvg2-dev \
|
||||||
libexif-dev \
|
libexif-dev \
|
||||||
lcms2-dev \
|
liblcms2-dev \
|
||||||
libheif-dev \
|
libheif-dev \
|
||||||
tiff-dev \
|
libtiff-dev \
|
||||||
&& apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \
|
|
||||||
giflib-dev \
|
|
||||||
&& apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
|
|
||||||
libimagequant-dev
|
libimagequant-dev
|
||||||
|
|
||||||
# Build ImageMagick
|
# Build ImageMagick
|
||||||
@ -61,7 +57,8 @@ RUN cd /root \
|
|||||||
--without-webp \
|
--without-webp \
|
||||||
--without-heic \
|
--without-heic \
|
||||||
--without-pango \
|
--without-pango \
|
||||||
&& make install-strip
|
&& make install-strip \
|
||||||
|
&& rm -rf /usr/local/lib/libMagickWand-7.*
|
||||||
|
|
||||||
# Build libvips
|
# Build libvips
|
||||||
RUN cd /root \
|
RUN cd /root \
|
||||||
@ -74,55 +71,51 @@ RUN cd /root \
|
|||||||
--without-OpenEXR \
|
--without-OpenEXR \
|
||||||
--enable-debug=no \
|
--enable-debug=no \
|
||||||
--disable-static \
|
--disable-static \
|
||||||
|
--disable-introspection \
|
||||||
--enable-silent-rules \
|
--enable-silent-rules \
|
||||||
&& make install-strip
|
&& make install-strip \
|
||||||
|
&& rm -rf /usr/local/lib/libvips-cpp.*
|
||||||
|
|
||||||
ADD . /app
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
COPY . .
|
||||||
|
|
||||||
# Build imgproxy
|
# Build imgproxy
|
||||||
RUN cd /app \
|
RUN go build -v -o /usr/local/bin/imgproxy
|
||||||
&& CGO_LDFLAGS_ALLOW="-s|-w" go build -v -o /usr/local/bin/imgproxy
|
|
||||||
|
|
||||||
# Copy compiled libs here to copy them to the final image
|
|
||||||
RUN cd /root \
|
|
||||||
&& mkdir libs \
|
|
||||||
&& ldd /usr/local/bin/imgproxy | grep /usr/local/lib/ | awk '{print $3}' | xargs -I '{}' cp '{}' libs/
|
|
||||||
|
|
||||||
# ==================================================================================================
|
# ==================================================================================================
|
||||||
# Final image
|
# Final image
|
||||||
|
|
||||||
FROM alpine:3.10
|
FROM debian:buster-slim
|
||||||
LABEL maintainer="Sergey Alexandrovich <darthsim@gmail.com>"
|
LABEL maintainer="Sergey Alexandrovich <darthsim@gmail.com>"
|
||||||
|
|
||||||
RUN apk --no-cache upgrade \
|
RUN apt-get update \
|
||||||
&& apk add --no-cache \
|
&& apt-get install -y --no-install-recommends \
|
||||||
bash \
|
bash \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
fftw \
|
libsm6 \
|
||||||
glib \
|
libfftw3-3 \
|
||||||
libltdl \
|
libglib2.0-0 \
|
||||||
expat \
|
libexpat1 \
|
||||||
libjpeg-turbo \
|
libjpeg62-turbo \
|
||||||
libpng \
|
libpng16-16 \
|
||||||
libwebp \
|
libwebp6 \
|
||||||
librsvg \
|
libwebpmux3 \
|
||||||
libgsf \
|
libwebpdemux2 \
|
||||||
libexif \
|
libgif7 \
|
||||||
lcms2 \
|
librsvg2-2 \
|
||||||
libheif \
|
libexif12 \
|
||||||
tiff \
|
liblcms2-2 \
|
||||||
&& apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \
|
libheif1 \
|
||||||
giflib \
|
libtiff5 \
|
||||||
&& apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
|
libimagequant0 \
|
||||||
libimagequant \
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
&& rm -rf /var/cache/apk*
|
|
||||||
|
|
||||||
COPY --from=0 /usr/local/bin/imgproxy /usr/local/bin/
|
COPY --from=0 /usr/local/bin/imgproxy /usr/local/bin/
|
||||||
COPY --from=0 /root/libs/* /usr/local/lib/
|
COPY --from=0 /usr/local/lib /usr/local/lib
|
||||||
|
|
||||||
ENV VIPS_WARNING=0
|
ENV VIPS_WARNING=0
|
||||||
ENV MALLOC_ARENA_MAX=4
|
ENV MALLOC_ARENA_MAX=4
|
||||||
|
ENV LD_LIBRARY_PATH /lib64:/usr/lib64:/usr/local/lib
|
||||||
|
|
||||||
CMD ["imgproxy"]
|
CMD ["imgproxy"]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user