Skip to content

Commit

Permalink
Upgrade all packages at the end of build
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Cosby committed Sep 25, 2024
1 parent b37600b commit 69e8b98
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions images/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ WORKDIR /actions-runner
# Configure git-core/ppa based on guidance here: https://git-scm.com/download/linux
# The second `apt-get update` isn't strictly necessary, but let's leave it here to force the
# image build to break if the ppa is suddenly unavailable.
RUN apt-get update -y \
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl unzip sudo lsb-release gpg-agent software-properties-common \
&& add-apt-repository ppa:git-core/ppa \
&& apt-get update -y
&& apt-get update

RUN export RUNNER_ARCH=${TARGETARCH} \
&& if [ "$RUNNER_ARCH" = "amd64" ]; then export RUNNER_ARCH=x64 ; fi \
Expand All @@ -45,9 +45,10 @@ COPY --from=build /etc/apt/trusted.gpg.d/*.gpg /etc/apt/trusted.gpg.d/
COPY --from=docker-cli --chown=root:root --chmod=0555 /usr/local/bin/docker /usr/bin/docker
COPY --from=docker-cli --chown=root:root --chmod=0555 /usr/local/libexec/docker/cli-plugins/docker-buildx /usr/local/libexec/docker/cli-plugins/docker-buildx

# Install a sane set of base utilities
RUN apt-get update -y \
# Install a sane set of base utilities and upgrade all system packages
RUN apt-get update \
&& apt-get install -y --no-install-recommends sudo lsb-release gpg-agent software-properties-common curl git jq unzip \
&& apt-get upgrade -y \
&& apt-get clean all \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*

Expand Down

0 comments on commit 69e8b98

Please sign in to comment.