Skip to content

Commit 5360d75

Browse files
committed
linuxfr-img container can use bookworm to build the Go service
1 parent 4f85f9f commit 5360d75

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

deployment/linuxfr-img/Containerfile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
FROM docker.io/debian:bullseye-slim as build
1+
FROM docker.io/debian:bookworm-slim as base
2+
3+
FROM base as build
24

35
LABEL org.opencontainers.image.title="LinuxFr.org image caching service"
46
LABEL org.opencontainers.image.description="Store external images into a cache to not flood external website"
57
LABEL org.opencontainers.image.source="https://github.com/linuxfrorg/img-LinuxFr.org"
68
LABEL org.opencontainers.image.url="https://github.com/linuxfrorg/linuxfr.org/blob/master/Container.md"
79
LABEL org.opencontainers.image.licenses="AGPL-3.0-only"
8-
LABEL org.opencontainers.image.version="rails7-bullseye"
10+
LABEL org.opencontainers.image.version="bookworm"
911
LABEL org.opencontainers.image.authors="Adrien Dorsaz <[email protected]>"
1012

1113
ARG UID=1200
@@ -24,9 +26,14 @@ ENV HOME=/linuxfr-img
2426
WORKDIR /linuxfr-img
2527

2628
# Build linuxfr-img
27-
RUN go get -u github.com/linuxfrorg/img-LinuxFr.org
29+
RUN \
30+
set -eux; \
31+
IFS=$'\n\t'; \
32+
git clone https://github.com/linuxfrorg/img-LinuxFr.org; \
33+
cd img-LinuxFr.org; \
34+
go install;
2835

29-
FROM docker.io/debian:bullseye-slim as deploy
36+
FROM base as deploy
3037

3138
ARG UID=1200
3239

@@ -40,8 +47,6 @@ RUN \
4047
apt-get clean;
4148

4249
USER ${UID}
43-
ENV GOPATH=/linuxfr-img
44-
ENV HOME=/linuxfr-img
4550
WORKDIR /linuxfr-img
4651

4752
COPY --from=build --chown=${UID}:0 --chmod=770 /linuxfr-img/bin/img-LinuxFr.org .

0 commit comments

Comments
 (0)