Skip to content

Commit 175abc5

Browse files
committed
wip: v48
- Update dependabot to properly scan the dev Dockerfile weekly - Add syft, grype, oras, and cosign to the tools iamge - Update various dependencies to be managed as OCI dependencies (for dependabot management) - Update other dependencies, including Go (to 1.25) and Rust (to 1.90) - setup-tools action: - Hack mandb to avoid slowness during apt installs in GitHub Actions - Unpack the tools binaries without doing a full docker buildx setup
1 parent 58370e7 commit 175abc5

File tree

3 files changed

+38
-55
lines changed

3 files changed

+38
-55
lines changed

.github/dependabot.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
version: 2
22
updates:
33
- package-ecosystem: "docker"
4-
directory: "/.devcontainer"
4+
directory: "/"
55
schedule:
6-
interval: daily
7-
time: "05:00"
8-
timezone: "UTC"
6+
interval: "weekly"
97

108
- package-ecosystem: "github-actions"
119
directory: "/"
1210
schedule:
13-
interval: "daily"
14-
time: "04:00"
15-
timezone: "UTC"
11+
interval: "weekly"

Dockerfile

Lines changed: 18 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
##
66

77

8-
ARG GO_TAG=1.24
9-
ARG RUST_TAG=1.88.0
8+
ARG GO_TAG=1.25
9+
ARG RUST_TAG=1.90.0
1010

1111
# These layers include Debian apt caches, so layers that extend `apt-base`
1212
# should not be published. Instead, these layers should be used to provide
@@ -45,13 +45,13 @@ RUN url="https://github.com/olix0r/j5j/releases/download/${J5J_VERSION}/j5j-${J5
4545

4646
# just runs build/test recipes. Like `make` but a bit more ergonomic.
4747
FROM apt-base as just
48-
ARG JUST_VERSION=1.42.4 # repo=casey/just
48+
ARG JUST_VERSION=1.43.0 # repo=casey/just
4949
RUN url="https://github.com/casey/just/releases/download/${JUST_VERSION}/just-${JUST_VERSION}-x86_64-unknown-linux-musl.tar.gz" ; \
5050
scurl "$url" | tar zvxf - -C /usr/local/bin just
5151

5252
# yq is kind of like jq, but for YAML.
5353
FROM apt-base as yq
54-
ARG YQ_VERSION=v4.47.1 # repo=mikefarah/yq
54+
ARG YQ_VERSION=v4.47.2 # repo=mikefarah/yq
5555
RUN url="https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64" ; \
5656
scurl -o /yq "$url" && chmod +x /yq
5757

@@ -67,7 +67,7 @@ COPY --link bin/scurl /bin/
6767

6868
# helm templates kubernetes manifests.
6969
FROM apt-base as helm
70-
ARG HELM_VERSION=v3.18.4 # repo=helm/helm
70+
ARG HELM_VERSION=v3.19.0 # repo=helm/helm
7171
RUN url="https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz" ; \
7272
scurl "$url" | tar xzvf - --strip-components=1 -C /usr/local/bin linux-amd64/helm
7373

@@ -80,50 +80,34 @@ RUN url="https://github.com/norwoodj/helm-docs/releases/download/$HELM_DOCS_VERS
8080

8181
# kubectl controls kubernetes clusters.
8282
FROM apt-base as kubectl
83-
ARG KUBECTL_VERSION=v1.33.3 # repo=kubernetes/kubernetes
83+
ARG KUBECTL_VERSION=v1.34.1 # repo=kubernetes/kubernetes
8484
RUN url="https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl" ; \
8585
scurl -o /usr/local/bin/kubectl "$url" && chmod +x /usr/local/bin/kubectl
8686

8787
# k3d runs kubernetes clusters in docker.
8888
FROM apt-base as k3d
89-
ARG K3D_VERSION=v5.8.3 # repo=rancher/k3d
90-
RUN url="https://raw.githubusercontent.com/rancher/k3d/$K3D_VERSION/install.sh" ; \
91-
scurl "$url" | USE_SUDO=false K3D_INSTALL_DIR=/usr/local/bin bash
89+
COPY --link --from=ghcr.io/k3d-io/k3d-tools:5.8.3 /bin/k3d /usr/local/bin/
9290
# just-k3d is a utility that encodes many of the common k3d commands we use.
9391
COPY --link bin/just-k3d /usr/local/bin/
9492
# `K3S_IMAGES_JSON` configures just-k3d so that it uses a pinned version of k3s.
9593
# This is generated by `just sync-k3s-images` and i
9694
ENV K3S_IMAGES_JSON=/usr/local/etc/k3s-images.json
9795
COPY --link k3s-images.json "$K3S_IMAGES_JSON"
9896

99-
# step is a tool for managing certificates.
100-
FROM apt-base as step
101-
ARG STEP_VERSION=v0.28.7 # repo=smallstep/cli
102-
RUN url="https://dl.smallstep.com/gh-release/cli/gh-release-header/${STEP_VERSION}/step_linux_${STEP_VERSION#v}_amd64.tar.gz" ; \
103-
scurl "$url" | tar xzvf - --strip-components=2 -C /usr/local/bin step_"${STEP_VERSION#v}"/bin/step
104-
10597
FROM scratch as tools-k8s
10698
COPY --link --from=helm /usr/local/bin/helm /bin/
10799
COPY --link --from=helm-docs /usr/local/bin/helm-docs /bin/
108100
COPY --link --from=k3d /usr/local/bin/* /bin/
109101
ENV K3S_IMAGES_JSON=/etc/k3s-images.json
110102
COPY --link --from=k3d /usr/local/etc/k3s-images.json "$K3S_IMAGES_JSON"
111103
COPY --link --from=kubectl /usr/local/bin/kubectl /bin/
112-
COPY --link --from=step /usr/local/bin/step /bin/
113-
114-
FROM apt-base as syft
115-
ARG SYFT_VERSION=v1.29.0 # repo=anchore/syft
116-
RUN url="https://github.com/anchore/syft/releases/download/${SYFT_VERSION}/syft_${SYFT_VERSION#v}_linux_amd64.tar.gz" ; \
117-
scurl "$url" | tar xzvf - -C /usr/local/bin syft
118-
119-
FROM apt-base as grype
120-
ARG GRYPE_VERSION=v0.96.1 # repo=anchore/grype
121-
RUN url="https://github.com/anchore/grype/releases/download/${GRYPE_VERSION}/grype_${GRYPE_VERSION#v}_linux_amd64.tar.gz" ; \
122-
scurl "$url" | tar xzvf - -C /usr/local/bin grype
104+
COPY --link --from=docker.io/smallstep/step-cli:0.28.7 /usr/local/bin/step /bin/
123105

124106
FROM scratch as tools-oci
125-
COPY --link --from=syft /usr/local/bin/syft /bin/
126-
COPY --link --from=grype /usr/local/bin/grype /bin/
107+
COPY --link --from=ghcr.io/sigstore/cosign/cosign:v2.4.1 /ko-app/cosign /bin/
108+
COPY --link --from=ghcr.io/oras-project/oras:v1.3.0 /bin/oras /bin/
109+
COPY --link --from=ghcr.io/anchore/syft:v1.33.0 /syft /bin/
110+
COPY --link --from=ghcr.io/anchore/grype:v0.96.1 /grype /bin/
127111

128112
##
129113
## Linting tools
@@ -141,25 +125,18 @@ ARG CHECKSEC_VERSION=2.7.1 # ignore
141125
RUN url="https://raw.githubusercontent.com/slimm609/checksec/${CHECKSEC_VERSION}/checksec" ; \
142126
scurl -o /usr/local/bin/checksec "$url" && chmod 755 /usr/local/bin/checksec
143127

144-
# shellcheck lints shell scripts.
145-
FROM apt-base as shellcheck
146-
ARG SHELLCHECK_VERSION=v0.10.0 # repo=koalaman/shellcheck
147-
RUN url="https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" ; \
148-
scurl "$url" | tar xJvf - --strip-components=1 -C /usr/local/bin "shellcheck-${SHELLCHECK_VERSION}/shellcheck"
149-
COPY --link bin/just-sh /usr/local/bin/
150-
151128
FROM scratch as tools-lint
152129
COPY --link --from=actionlint /usr/local/bin/actionlint /bin/
153130
COPY --link --from=checksec /usr/local/bin/checksec /bin/
154-
COPY --link --from=shellcheck /usr/local/bin/shellcheck /bin/
131+
COPY --link --from=docker.io/koalaman/shellcheck:v0.11.0 /bin/shellcheck /bin/
155132
COPY --link bin/action-* bin/just-dev bin/just-sh /bin/
156133

157134
##
158135
## Protobuf
159136
##
160137

161138
FROM apt-base as protobuf
162-
ARG PROTOC_VERSION=v31.1 # repo=protocolbuffers/protobuf
139+
ARG PROTOC_VERSION=v32.1 # repo=protocolbuffers/protobuf
163140
RUN url="https://github.com/google/protobuf/releases/download/$PROTOC_VERSION/protoc-${PROTOC_VERSION#v}-linux-$(uname -m).zip" ; \
164141
cd $(mktemp -d) && \
165142
scurl -o protoc.zip "$url" && \
@@ -186,13 +163,13 @@ RUN url="https://github.com/rust-secure-code/cargo-auditable/releases/download/$
186163

187164
# cargo-deny checks cargo dependencies for licensing and RUSTSEC security issues.
188165
FROM apt-base as cargo-deny
189-
ARG CARGO_DENY_VERSION=0.18.3 # repo=EmbarkStudios/cargo-deny
166+
ARG CARGO_DENY_VERSION=0.18.5 # repo=EmbarkStudios/cargo-deny
190167
RUN url="https://github.com/EmbarkStudios/cargo-deny/releases/download/${CARGO_DENY_VERSION}/cargo-deny-${CARGO_DENY_VERSION}-x86_64-unknown-linux-musl.tar.gz" ; \
191168
scurl "$url" | tar zvxf - --strip-components=1 -C /usr/local/bin "cargo-deny-${CARGO_DENY_VERSION}-x86_64-unknown-linux-musl/cargo-deny"
192169

193170
# cargo-nextest is a nicer test runner.
194171
FROM apt-base as cargo-nextest
195-
ARG NEXTEST_VERSION=0.9.101 # repo=nextest-rs/nextest,prefix=cargo-nextest-
172+
ARG NEXTEST_VERSION=0.9.104 # repo=nextest-rs/nextest,prefix=cargo-nextest-
196173
RUN url="https://github.com/nextest-rs/nextest/releases/download/cargo-nextest-${NEXTEST_VERSION}/cargo-nextest-${NEXTEST_VERSION}-x86_64-unknown-linux-gnu.tar.gz" ; \
197174
scurl "$url" | tar zvxf - -C /usr/local/bin cargo-nextest
198175

@@ -248,7 +225,7 @@ FROM docker.io/library/golang:${GO_TAG} as gotests
248225
RUN go install github.com/cweill/gotests/gotests@latest
249226

250227
FROM docker.io/library/golang:${GO_TAG} as gotestsum
251-
ARG GOTESTSUM_VERSION=v1.12.0
228+
ARG GOTESTSUM_VERSION=v1.13.0 # repo=gotestyourself/gotestsum
252229
RUN go install gotest.tools/gotestsum@${GOTESTSUM_VERSION}
253230

254231
FROM scratch as tools-go
@@ -344,6 +321,7 @@ RUN --mount=type=cache,from=apt-base,source=/etc/apt,target=/etc/apt,ro \
344321
--mount=type=cache,from=apt-base,source=/var/cache/apt,target=/var/cache/apt,sharing=locked \
345322
--mount=type=cache,from=apt-base,source=/var/lib/apt/lists,target=/var/lib/apt/lists,sharing=locked \
346323
DEBIAN_FRONTEND=noninteractive apt-get install -y \
324+
binutils-aarch64-linux-gnu \
347325
g++-aarch64-linux-gnu \
348326
gcc-aarch64-linux-gnu \
349327
libc6-dev-arm64-cross

actions/setup-tools/action.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,31 @@ inputs:
1010
runs:
1111
using: composite
1212
steps:
13-
- uses: docker/setup-buildx-action@v3
13+
- name: "Hack mandb"
14+
shell: bash
15+
run: |
16+
sudo dpkg-divert --local --rename --add /usr/bin/mandb
17+
sudo ln -sf /bin/true /usr/bin/mandb
18+
19+
- shell: bash
20+
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends jo umoci
1421

1522
- name: Extract tools
1623
shell: bash
1724
run: |
1825
set -xeuo pipefail
1926
20-
build=$(mktemp -d '${{ runner.temp }}/build.XXXX')
21-
echo 'FROM ghcr.io/linkerd/dev:${{ inputs.version }}-tools' > "$build"/Dockerfile
27+
oci_dir=$(mktemp -d '${{ runner.temp }}/oci.XXXX')
28+
bundle_dir=$(mktemp -d '${{ runner.temp }}/bundle.XXXX')
2229
23-
tools=$(mktemp -d '${{ runner.temp }}/tools.XXXX')
24-
docker buildx build "$build" --output="type=local,dest=$tools/"
30+
skopeo copy \
31+
"docker://ghcr.io/linkerd/dev:${{ inputs.version }}-tools" \
32+
"oci:$oci_dir:tools"
33+
34+
umoci unpack --rootless --image "$oci_dir:tools" "$bundle_dir"
35+
36+
tools="$bundle_dir/rootfs"
2537
(
2638
echo K3S_IMAGES_JSON="$tools/etc/k3s-images.json"
2739
echo PATH="$tools/bin:$PATH"
2840
) >> "$GITHUB_ENV"
29-
30-
- shell: bash
31-
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends jo jq

0 commit comments

Comments
 (0)