Skip to content

Commit

Permalink
Bump to Fedora 39
Browse files Browse the repository at this point in the history
This brings Go 1.21. Go 1.21 no longer ships .a libraries, so the
corresponding clean-up is removed.

Python is upgraded to 3.12, which breaks j2cli; this switches to the
packaged python3-jinja2-cli instead. The latter has progressed since
j2cli was created, and should support all the j2cli features needed in
Submariner (more precisely, for OVN).

The official GitHub client is available as a package, install that
instead of the upstream tarball.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
  • Loading branch information
skitt committed Nov 8, 2023
1 parent 53c6d10 commit b14694c
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions package/Dockerfile.shipyard-dapper-base
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM fedora:38
FROM fedora:39

# Unless specified otherwise, compress to a medium level which gives (from experemintation) a
# good balance between compression time and resulting image size.
Expand Down Expand Up @@ -43,20 +43,18 @@ ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH} PATH=/go/bin:/root/.l
# We remove:
# - DNF cache
# - Any unnecessary packages and executables
# - Precompiled packages in go (see https://github.com/golang/go/issues/47257)
RUN dnf -y install --nodocs --setopt=install_weak_deps=False \
gcc git-core curl moby-engine make golang kubernetes-client \
findutils moreutils upx jq gitlint procps-ng python3-setuptools \
qemu-user-static python3-pip skopeo file unzip && \
pip install j2cli[yaml] --user && \
rpm -e --nodeps containerd python3-pip && \
findutils moreutils upx jq gitlint procps-ng \
qemu-user-static python3-jinja2-cli skopeo file unzip gh && \
rpm -e --nodeps containerd && \
rpm -qa "selinux*" | xargs -r rpm -e --nodeps && \
dnf -y clean all && \
rm -f /usr/bin/{dockerd,lto-dump} \
/usr/libexec/gcc/x86_64-redhat-linux/10/lto1 && \
find /usr/lib/golang -name '*.a' -newercc /proc -delete && \
find /usr/bin /usr/lib/golang /usr/libexec -type f -executable -newercc /proc -size +1M ! -name hyperkube \( -execdir upx ${UPX_LEVEL} {} \; -o -true \) && \
ln -f /usr/bin/kubectl /usr/bin/hyperkube
ln -f /usr/bin/kubectl /usr/bin/hyperkube && \
ln -f /usr/bin/jinja2 /usr/bin/j2

COPY tools/go.mod /tools.mod

Expand All @@ -74,10 +72,6 @@ RUN LINT_VERSION=$(awk '/golangci-lint/ { print $2 }' /tools.mod) && \
BUILDX_VERSION=$(awk '/docker.buildx/ { print $2 }' /tools.mod) && \
curl -L "https://github.com/docker/buildx/releases/download/${BUILDX_VERSION}/buildx-${BUILDX_VERSION}.linux-${ARCH}" -o /usr/local/libexec/docker/cli-plugins/docker-buildx && \
chmod 755 /usr/local/libexec/docker/cli-plugins/docker-buildx && \
GH_VERSION=$(awk '/github.com.cli.cli/ { print substr($2, 2) }' /tools.mod) && \
curl -L https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_linux_${ARCH}.tar.gz | tar xzf - && \
mv gh_${GH_VERSION}_linux_${ARCH}/bin/gh /go/bin/ && \
rm -rf gh_${GH_VERSION}_linux_${ARCH} && \
find /go/bin /usr/local/libexec/docker/cli-plugins -type f -executable -newercc /proc -exec strip {} + && \
find /go/bin /usr/local/libexec/docker/cli-plugins -type f -executable -newercc /proc \( -execdir upx ${UPX_LEVEL} {} \; -o -true \) && \
go clean -cache -modcache && rm -f /tools.mod
Expand Down

0 comments on commit b14694c

Please sign in to comment.