-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (34 loc) · 1.09 KB
/
Dockerfile
File metadata and controls
44 lines (34 loc) · 1.09 KB
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
34
35
36
37
38
39
40
41
42
43
44
# Stage 1: Build imaginary binary
FROM ghcr.io/trueforge-org/golang:1.26.0@sha256:a317c1cdc553dbe966530f0c94e850e93fe86d55164942949d90d0870ceae355 as go
ARG VERSION
ARG IMAGINARY_COMMIT=b632dae8cc321452c3f85bcae79c580b1ae1ed84
USER root
RUN set -ex; \
apt-get update; \
apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
libvips-dev \
libjxl-dev \
libheif-dev \
libmagickwand-dev \
poppler-utils; \
rm -rf /var/lib/apt/lists/*; \
go install github.com/h2non/imaginary@${IMAGINARY_COMMIT}
# Stage 2: Minimal runtime
FROM ghcr.io/trueforge-org/golang:1.26.0@sha256:a317c1cdc553dbe966530f0c94e850e93fe86d55164942949d90d0870ceae355
USER root
RUN set -ex; \
apt-get update; \
apt-get install -y --no-install-recommends \
libvips42 \
libjxl0.7 \
libheif1 \
imagemagick \
poppler-utils; \
rm -rf /var/lib/apt/lists/*
COPY --from=go /config/go/bin/imaginary /usr/local/bin/imaginary
USER apps
COPY --chmod=0755 . /
ENV MALLOC_ARENA_MAX=2
CMD ["imaginary", "-p", "9000"]