Skip to content

Commit 226fe36

Browse files
ItalyPaleAlegkmw
authored andcommitted
Updated Dockerfile (h2non#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
1 parent 1dee225 commit 226fe36

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
**/*~
2+
.devcontainer
3+
.github
24
.git
5+
Dockerfile
6+
docker-compose.yml

Dockerfile

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
ARG GOLANG_VERSION=1.17
2-
FROM golang:${GOLANG_VERSION}-buster as builder
2+
FROM golang:${GOLANG_VERSION}-bullseye as builder
33

44
ARG IMAGINARY_VERSION=dev
5-
ARG LIBVIPS_VERSION=8.10.0
5+
ARG LIBVIPS_VERSION=8.12.2
66
ARG GOLANGCILINT_VERSION=1.29.0
77

88
# Installs libvips + required libraries
@@ -59,7 +59,7 @@ RUN go build -a \
5959
-ldflags="-s -w -h -X main.Version=${IMAGINARY_VERSION}" \
6060
github.com/h2non/imaginary
6161

62-
FROM debian:buster-slim
62+
FROM debian:bullseye-slim
6363

6464
ARG IMAGINARY_VERSION
6565

@@ -78,22 +78,15 @@ COPY --from=builder /etc/ssl/certs /etc/ssl/certs
7878
RUN DEBIAN_FRONTEND=noninteractive \
7979
apt-get update && \
8080
apt-get install --no-install-recommends -y \
81-
procps libglib2.0-0 libjpeg62-turbo libpng16-16 libopenexr23 \
81+
procps libglib2.0-0 libjpeg62-turbo libpng16-16 libopenexr25 \
8282
libwebp6 libwebpmux3 libwebpdemux2 libtiff5 libgif7 libexif12 libxml2 libpoppler-glib8 \
83-
libmagickwand-6.q16-6 libpango1.0-0 libmatio4 libopenslide0 \
84-
libgsf-1-114 fftw3 liborc-0.4-0 librsvg2-2 libcfitsio7 libimagequant0 libheif1 && \
83+
libmagickwand-6.q16-6 libpango1.0-0 libmatio11 libopenslide0 libjemalloc2 \
84+
libgsf-1-114 fftw3 liborc-0.4-0 librsvg2-2 libcfitsio9 libimagequant0 libheif1 && \
85+
ln -s /usr/lib/$(uname -m)-linux-gnu/libjemalloc.so.2 /usr/local/lib/libjemalloc.so && \
8586
apt-get autoremove -y && \
8687
apt-get autoclean && \
8788
apt-get clean && \
8889
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
89-
90-
ADD https://github.com/jemalloc/jemalloc/releases/download/5.2.1/jemalloc-5.2.1.tar.bz2 /tmp/jemalloc-5.2.1.tar.bz2
91-
RUN apt-get update && apt install -y bzip2 gcc make autoconf
92-
RUN cd /tmp \
93-
&& tar -jxvf jemalloc-5.2.1.tar.bz2 --no-same-owner \
94-
&& cd jemalloc-5.2.1 \
95-
&& ./configure --enable-prof && make && make install \
96-
&& rm -rf /tmp/*
9790
ENV LD_PRELOAD=/usr/local/lib/libjemalloc.so
9891

9992
# Server port to listen

0 commit comments

Comments
 (0)