mirror of
https://github.com/h2non/imaginary.git
synced 2025-12-13 20:37:04 +01:00
Updated Dockerfile (#384)
1. Changed base image to bullseye 2. The updated base image contains an updated version of libjemalloc too, so building from source is no longer necessary 3. Updated libvips version too
This commit is contained in:
committed by
GitHub
parent
5f473e58a6
commit
9489834a1d
@@ -1,2 +1,6 @@
|
||||
**/*~
|
||||
.devcontainer
|
||||
.github
|
||||
.git
|
||||
Dockerfile
|
||||
docker-compose.yml
|
||||
|
||||
21
Dockerfile
21
Dockerfile
@@ -1,8 +1,8 @@
|
||||
ARG GOLANG_VERSION=1.17
|
||||
FROM golang:${GOLANG_VERSION}-buster as builder
|
||||
FROM golang:${GOLANG_VERSION}-bullseye as builder
|
||||
|
||||
ARG IMAGINARY_VERSION=dev
|
||||
ARG LIBVIPS_VERSION=8.10.0
|
||||
ARG LIBVIPS_VERSION=8.12.2
|
||||
ARG GOLANGCILINT_VERSION=1.29.0
|
||||
|
||||
# Installs libvips + required libraries
|
||||
@@ -59,7 +59,7 @@ RUN go build -a \
|
||||
-ldflags="-s -w -h -X main.Version=${IMAGINARY_VERSION}" \
|
||||
github.com/h2non/imaginary
|
||||
|
||||
FROM debian:buster-slim
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
ARG IMAGINARY_VERSION
|
||||
|
||||
@@ -78,22 +78,15 @@ COPY --from=builder /etc/ssl/certs /etc/ssl/certs
|
||||
RUN DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get update && \
|
||||
apt-get install --no-install-recommends -y \
|
||||
procps libglib2.0-0 libjpeg62-turbo libpng16-16 libopenexr23 \
|
||||
procps libglib2.0-0 libjpeg62-turbo libpng16-16 libopenexr25 \
|
||||
libwebp6 libwebpmux3 libwebpdemux2 libtiff5 libgif7 libexif12 libxml2 libpoppler-glib8 \
|
||||
libmagickwand-6.q16-6 libpango1.0-0 libmatio4 libopenslide0 \
|
||||
libgsf-1-114 fftw3 liborc-0.4-0 librsvg2-2 libcfitsio7 libimagequant0 libheif1 && \
|
||||
libmagickwand-6.q16-6 libpango1.0-0 libmatio11 libopenslide0 libjemalloc2 \
|
||||
libgsf-1-114 fftw3 liborc-0.4-0 librsvg2-2 libcfitsio9 libimagequant0 libheif1 && \
|
||||
ln -s /usr/lib/$(uname -m)-linux-gnu/libjemalloc.so.2 /usr/local/lib/libjemalloc.so && \
|
||||
apt-get autoremove -y && \
|
||||
apt-get autoclean && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
ADD https://github.com/jemalloc/jemalloc/releases/download/5.2.1/jemalloc-5.2.1.tar.bz2 /tmp/jemalloc-5.2.1.tar.bz2
|
||||
RUN apt-get update && apt install -y bzip2 gcc make autoconf
|
||||
RUN cd /tmp \
|
||||
&& tar -jxvf jemalloc-5.2.1.tar.bz2 --no-same-owner \
|
||||
&& cd jemalloc-5.2.1 \
|
||||
&& ./configure --enable-prof && make && make install \
|
||||
&& rm -rf /tmp/*
|
||||
ENV LD_PRELOAD=/usr/local/lib/libjemalloc.so
|
||||
|
||||
# Server port to listen
|
||||
|
||||
Reference in New Issue
Block a user