Skip to content

Commit

Permalink
Containerfile: Bump the image from Fedora 38 -> 39
Browse files Browse the repository at this point in the history
The main motivation behind this change is the Go 1.21 version which
isn't available on Fedora 38 but is on Fedora 39.

Resolves: containerbuildsystem#387

Signed-off-by: Erik Skultety <[email protected]>
  • Loading branch information
eskultety committed Jan 22, 2024
1 parent ba2531c commit 8b32cfc
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Containerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.fedoraproject.org/fedora-minimal:38
FROM registry.fedoraproject.org/fedora-minimal:39
LABEL maintainer="Red Hat"

WORKDIR /src
Expand Down Expand Up @@ -28,4 +28,16 @@ RUN npm install && \
corepack enable yarn && \
microdnf -y remove nodejs-npm

# Install an older version of Go fixed at 1.20 (along with the base >=1.21):
# - install Go's official shim
# - let the shim download the actual Go SDK (the download forces the output parent dir to $HOME)
# - move the SDK to a host local install system-wide location
# - remove the shim as it forces and expects the SDK to be used from $HOME
# - clean any build artifacts Go creates as part of the process.
RUN go install golang.org/dl/go1.20@latest && \
$HOME/go/bin/go1.20 download && \
mkdir /usr/local/go && \
mv $HOME/sdk/go1.20 /usr/local/go && \
rm -rf $HOME/go $HOME/.cache/go-build/

ENTRYPOINT ["cachi2"]

0 comments on commit 8b32cfc

Please sign in to comment.