Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
dcc9f86
feat(justfile): pick latest git release via version="latest-git-tag"
unleashed Nov 19, 2025
469996b
feat(justfile): allow passing in additional docker args to build
unleashed Nov 19, 2025
a2d6691
feat(Dockerfile): install arch-specific versions of tools
unleashed Nov 19, 2025
d9a75a4
feat(Dockerfile): install docker-compose explicitly
unleashed Nov 19, 2025
e817d01
feat(justfile): support specifying architecture via docker_arch
unleashed Nov 19, 2025
02a7759
feat(justfile): use dry_run=true to print but avoid executing docker …
unleashed Nov 19, 2025
aba1270
feat(justfile): add podman support
unleashed Nov 19, 2025
c9b88db
feat(justfile): add pull_policy argument so we avoid hitting limits
unleashed Nov 19, 2025
d0fc217
feat(justfile, Dockerfile): make apt cache sharing configurable
unleashed Nov 19, 2025
79efd32
Revert "feat(justfile, Dockerfile): make apt cache sharing configurable"
unleashed Nov 19, 2025
5ec2148
feat(arm64): upgrade the container
raykroeker Jul 9, 2026
63a07af
feat(arm64): refactor unused stages
raykroeker Jul 10, 2026
f239e45
Drop nodejs.
raykroeker Jul 10, 2026
2a9adbc
feat(arm64,amd64): remove hardcoded arch from artifact locations (url…
anthoturc Aug 27, 2026
488c9ba
feat(arm64,amd64): sync k3s images
raykroeker Sep 16, 2026
93246ff
chore: bump to v51
anthoturc Sep 17, 2026
a6717aa
fix(dockerfile): run apt-get update before install gnupg2
anthoturc Sep 17, 2026
26c09de
fix(justfile): make publishing step actually build arm64
anthoturc Sep 18, 2026
2e99a16
fix(dockerfile): build j5j in docker image and copy missing tools
anthoturc Sep 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "linkerd-dev",
"image": "ghcr.io/linkerd/dev:v50",
"image": "ghcr.io/linkerd/dev:v51",
"customizations": {
"vscode": {
"extensions": [
Expand Down
169 changes: 103 additions & 66 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,52 +7,67 @@

ARG GO_TAG=1.26
ARG RUST_TAG=1.90.0
ARG DEBIAN_RELEASE=trixie

# These layers include Debian apt caches, so layers that extend `apt-base`
# should not be published. Instead, these layers should be used to provide
# cached data to individual `RUN` commands.

FROM docker.io/library/debian:bookworm-slim as apt-base
RUN echo 'deb http://deb.debian.org/debian bookworm-backports main' >>/etc/apt/sources.list
FROM docker.io/library/debian:${DEBIAN_RELEASE}-backports AS apt-base
RUN DEBIAN_FRONTEND=noninteractive apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y curl unzip xz-utils
COPY --link bin/scurl /usr/local/bin/

FROM apt-base as apt-node
RUN apt-get install -y gnupg2
ARG NODE_MAJOR=26
RUN mkdir -p /etc/apt/keyrings && scurl https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
RUN apt-get update && apt-get install nodejs -y

# See https://apt.llvm.org/.
FROM apt-base as apt-llvm
RUN DEBIAN_FRONTEND=noninteractive apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y gnupg2
Comment thread
anthoturc marked this conversation as resolved.
RUN curl --tlsv1.2 -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key |apt-key add -
RUN ( echo 'deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-19 main' \
&& echo 'deb-src http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-19 main' ) >> /etc/apt/sources.list
RUN /usr/bin/curl --tlsv1.2 -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key |/usr/bin/tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc

ARG DEBIAN_RELEASE
# https://docs.docker.com/reference/dockerfile#understand-how-arg-and-from-interact
# ^ declare arg to use the default value in RUN below
RUN ( echo "deb http://apt.llvm.org/${DEBIAN_RELEASE}/ llvm-toolchain-${DEBIAN_RELEASE}-22 main" \
&& echo "deb-src http://apt.llvm.org/${DEBIAN_RELEASE}/ llvm-toolchain-${DEBIAN_RELEASE}-22 main" ) > /etc/apt/sources.list.d/llvm-toolchain.list
RUN cat /etc/apt/sources.list.d/llvm-toolchain.list
RUN DEBIAN_FRONTEND=noninteractive apt-get update

##
## Scripting tools
##

# j5j Turns JSON5 into plain old JSON (i.e. to be processed by jq).
FROM apt-base as j5j
# json5 transforms json
FROM apt-base AS apt-json5
RUN DEBIAN_FRONTEND=noninteractive apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y node-json5
# consumers use j5j as the interface to stripping comments from json
RUN ln -s /usr/bin/json5 /usr/local/bin/j5j

# j5j turns JSON5 into plain old JSON (i.e. to be processed by jq). Upstream
# only publishes an x86_64 release asset, so it is built from source here to
# support both architectures.
FROM docker.io/library/rust:${RUST_TAG}-slim-${DEBIAN_RELEASE} as j5j
ARG J5J_VERSION=v0.2.0 # repo=olix0r/j5j
RUN url="https://github.com/olix0r/j5j/releases/download/${J5J_VERSION}/j5j-${J5J_VERSION}-x86_64-unknown-linux-musl.tar.gz" ; \
scurl "$url" | tar zvxf - -C /usr/local/bin j5j
# Built against musl so the binary is static: it is copied into scratch-based
# images and unpacked onto CI runners whose glibc is older than this builder's.
RUN target="$(uname -m)-unknown-linux-musl" ; \
rustup target add "$target" && \
cargo install --git https://github.com/olix0r/j5j --tag "${J5J_VERSION}" \
--target "$target" --root /usr/local

# just runs build/test recipes. Like `make` but a bit more ergonomic.
FROM apt-base as just
ARG JUST_VERSION=1.54.0 # repo=casey/just
RUN url="https://github.com/casey/just/releases/download/${JUST_VERSION}/just-${JUST_VERSION}-x86_64-unknown-linux-musl.tar.gz" ; \
ARG TARGETARCH
RUN arch=$(echo "$TARGETARCH" | sed -e 's/amd64/x86_64/' -e 's/arm64/aarch64/'); \
url="https://github.com/casey/just/releases/download/${JUST_VERSION}/just-${JUST_VERSION}-${arch}-unknown-linux-musl.tar.gz" ; \
scurl "$url" | tar zvxf - -C /usr/local/bin just

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

FROM scratch as tools-script
Expand All @@ -68,20 +83,24 @@ COPY --link bin/scurl /bin/
# helm templates kubernetes manifests.
FROM apt-base as helm
ARG HELM_VERSION=v3.21.2 # repo=helm/helm
RUN url="https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz" ; \
scurl "$url" | tar xzvf - --strip-components=1 -C /usr/local/bin linux-amd64/helm
ARG TARGETARCH
RUN url="https://get.helm.sh/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz" ; \
scurl "$url" | tar xzvf - --strip-components=1 -C /usr/local/bin "linux-${TARGETARCH}/helm"


# helm-docs generates documentation from helm charts.
FROM apt-base as helm-docs
ARG HELM_DOCS_VERSION=v1.14.2 # repo=norwoodj/helm-docs
RUN url="https://github.com/norwoodj/helm-docs/releases/download/$HELM_DOCS_VERSION/helm-docs_${HELM_DOCS_VERSION#v}_Linux_x86_64.tar.gz" ; \
ARG TARGETARCH
RUN arch=$(echo "$TARGETARCH" | sed -e 's/amd64/x86_64/'); \
url="https://github.com/norwoodj/helm-docs/releases/download/$HELM_DOCS_VERSION/helm-docs_${HELM_DOCS_VERSION#v}_Linux_${arch}.tar.gz" ; \
scurl "$url" | tar xzvf - -C /usr/local/bin helm-docs

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

# k3d runs kubernetes clusters in docker.
Expand Down Expand Up @@ -116,7 +135,8 @@ COPY --link --from=ghcr.io/anchore/grype:v0.96.1 /grype /bin/
# actionlint lints github actions workflows.
FROM apt-base as actionlint
ARG ACTIONLINT_VERSION=v1.7.12 # repo=rhysd/actionlint
RUN url="https://github.com/rhysd/actionlint/releases/download/${ACTIONLINT_VERSION}/actionlint_${ACTIONLINT_VERSION#v}_linux_amd64.tar.gz" ; \
ARG TARGETARCH
RUN url="https://github.com/rhysd/actionlint/releases/download/${ACTIONLINT_VERSION}/actionlint_${ACTIONLINT_VERSION#v}_linux_${TARGETARCH}.tar.gz" ; \
scurl "$url" | tar xzvf - -C /usr/local/bin actionlint

# checksec checks binaries for security issues.
Expand All @@ -137,7 +157,10 @@ COPY --link bin/action-* bin/just-dev bin/just-sh /bin/

FROM apt-base as protobuf
ARG PROTOC_VERSION=v35.1 # repo=protocolbuffers/protobuf
RUN url="https://github.com/google/protobuf/releases/download/$PROTOC_VERSION/protoc-${PROTOC_VERSION#v}-linux-$(uname -m).zip" ; \
ARG TARGETARCH
# protobuf spells arm64 as `aarch_64`, with an underscore.
RUN arch=$(echo "$TARGETARCH" | sed -e 's/amd64/x86_64/' -e 's/arm64/aarch_64/'); \
url="https://github.com/google/protobuf/releases/download/$PROTOC_VERSION/protoc-${PROTOC_VERSION#v}-linux-${arch}.zip" ; \
cd $(mktemp -d) && \
scurl -o protoc.zip "$url" && \
unzip protoc.zip bin/protoc include/** && \
Expand All @@ -153,30 +176,40 @@ RUN url="https://github.com/google/protobuf/releases/download/$PROTOC_VERSION/pr
# cargo-action-fmt formats `cargo build` JSON output to Github Actions annotations.
FROM apt-base as cargo-action-fmt
ARG CARGO_ACTION_FMT_VERSION=v1.0.4 # ignore
RUN url="https://github.com/olix0r/cargo-action-fmt/releases/download/release%2F${CARGO_ACTION_FMT_VERSION}/cargo-action-fmt-${CARGO_ACTION_FMT_VERSION}-x86_64-unknown-linux-musl.tar.gz" ; \
ARG TARGETARCH
RUN arch=$(echo "$TARGETARCH" | sed -e 's/amd64/x86_64/' -e 's/arm64/aarch64/'); \
url="https://github.com/olix0r/cargo-action-fmt/releases/download/release%2F${CARGO_ACTION_FMT_VERSION}/cargo-action-fmt-${CARGO_ACTION_FMT_VERSION}-${arch}-unknown-linux-musl.tar.gz" ; \
scurl "$url" | tar zvxf - -C /usr/local/bin cargo-action-fmt

FROM apt-base as cargo-auditable
ARG CARGO_AUDITABLE_VERSION=v0.7.5 # repo=rust-secure-code/cargo-auditable
RUN url="https://github.com/rust-secure-code/cargo-auditable/releases/download/${CARGO_AUDITABLE_VERSION}/cargo-auditable-x86_64-unknown-linux-gnu.tar.xz" ; \
scurl "$url" | tar xJvf - --strip-components=1 -C /usr/local/bin cargo-auditable-x86_64-unknown-linux-gnu/cargo-auditable
ARG TARGETARCH
RUN arch=$(echo "$TARGETARCH" | sed -e 's/amd64/x86_64/' -e 's/arm64/aarch64/'); \
url="https://github.com/rust-secure-code/cargo-auditable/releases/download/${CARGO_AUDITABLE_VERSION}/cargo-auditable-${arch}-unknown-linux-gnu.tar.xz" ; \
scurl "$url" | tar xJvf - --strip-components=1 -C /usr/local/bin "cargo-auditable-${arch}-unknown-linux-gnu/cargo-auditable"

# cargo-deny checks cargo dependencies for licensing and RUSTSEC security issues.
FROM apt-base as cargo-deny
ARG CARGO_DENY_VERSION=0.19.9 # repo=EmbarkStudios/cargo-deny
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" ; \
scurl "$url" | tar zvxf - --strip-components=1 -C /usr/local/bin "cargo-deny-${CARGO_DENY_VERSION}-x86_64-unknown-linux-musl/cargo-deny"
ARG TARGETARCH
RUN arch=$(echo "$TARGETARCH" | sed -e 's/amd64/x86_64/' -e 's/arm64/aarch64/'); \
url="https://github.com/EmbarkStudios/cargo-deny/releases/download/${CARGO_DENY_VERSION}/cargo-deny-${CARGO_DENY_VERSION}-${arch}-unknown-linux-musl.tar.gz" ; \
scurl "$url" | tar zvxf - --strip-components=1 -C /usr/local/bin "cargo-deny-${CARGO_DENY_VERSION}-${arch}-unknown-linux-musl/cargo-deny"

# cargo-nextest is a nicer test runner.
FROM apt-base as cargo-nextest
ARG NEXTEST_VERSION=0.9.138 # repo=nextest-rs/nextest,prefix=cargo-nextest-
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" ; \
ARG TARGETARCH
RUN arch=$(echo "$TARGETARCH" | sed -e 's/amd64/x86_64/' -e 's/arm64/aarch64/'); \
url="https://github.com/nextest-rs/nextest/releases/download/cargo-nextest-${NEXTEST_VERSION}/cargo-nextest-${NEXTEST_VERSION}-${arch}-unknown-linux-gnu.tar.gz" ; \
scurl "$url" | tar zvxf - -C /usr/local/bin cargo-nextest

# cargo-tarpaulin is a code coverage tool.
FROM apt-base as cargo-tarpaulin
ARG CARGO_TARPAULIN_VERSION=0.35.5 # repo=xd009642/tarpaulin
RUN url="https://github.com/xd009642/tarpaulin/releases/download/${CARGO_TARPAULIN_VERSION}/cargo-tarpaulin-x86_64-unknown-linux-musl.tar.gz" ;\
ARG TARGETARCH
RUN arch=$(echo "$TARGETARCH" | sed -e 's/amd64/x86_64/' -e 's/arm64/aarch64/'); \
url="https://github.com/xd009642/tarpaulin/releases/download/${CARGO_TARPAULIN_VERSION}/cargo-tarpaulin-${arch}-unknown-linux-musl.tar.gz" ;\
scurl "$url" | tar xzvf - -C /usr/local/bin cargo-tarpaulin

FROM scratch as tools-rust
Expand Down Expand Up @@ -266,9 +299,9 @@ COPY --link --from=tools-script /bin/* /bin/

# A Go build environment.
FROM docker.io/library/golang:${GO_TAG} as go
RUN --mount=type=cache,from=apt-base,source=/etc/apt,target=/etc/apt,ro \
RUN --mount=type=cache,from=apt-base,source=/etc/apt,target=/etc/apt,sharing=locked \
--mount=type=cache,from=apt-base,source=/var/cache/apt,target=/var/cache/apt,sharing=locked \
--mount=type=cache,from=apt-base,source=/var/lib/apt/lists,target=/var/lib/apt/lists,sharing=locked \
--mount=type=cache,from=apt-base,source=/var/lib/apt,target=/var/lib/apt,sharing=locked \
DEBIAN_FRONTEND=noninteractive apt-get install -y file jo jq
COPY --link --from=tools-script /bin/* /usr/local/bin/
COPY --link --from=tools-go /bin/* /usr/local/bin/
Expand All @@ -279,10 +312,10 @@ ENV PROTOC_NO_VENDOR=1 \
PROTOC_INCLUDE=/usr/local/include

# A Rust build environment.
FROM docker.io/library/rust:${RUST_TAG}-slim-bookworm as rust
RUN --mount=type=cache,from=apt-base,source=/etc/apt,target=/etc/apt,ro \
FROM docker.io/library/rust:${RUST_TAG}-slim-${DEBIAN_RELEASE} as rust
RUN --mount=type=cache,from=apt-base,source=/etc/apt,target=/etc/apt,sharing=locked \
--mount=type=cache,from=apt-base,source=/var/cache/apt,target=/var/cache/apt,sharing=locked \
--mount=type=cache,from=apt-base,source=/var/lib/apt/lists,target=/var/lib/apt/lists,sharing=locked \
--mount=type=cache,from=apt-base,source=/var/lib/apt,target=/var/lib/apt,sharing=locked \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
cmake \
curl \
Expand All @@ -293,9 +326,9 @@ RUN --mount=type=cache,from=apt-base,source=/etc/apt,target=/etc/apt,ro \
jq \
libssl-dev \
pkg-config
RUN --mount=type=cache,from=apt-llvm,source=/etc/apt,target=/etc/apt,ro \
--mount=type=cache,from=apt-llvm,source=/var/cache/apt,target=/var/cache/apt,sharing=locked \
--mount=type=cache,from=apt-llvm,source=/var/lib/apt/lists,target=/var/lib/apt/lists,sharing=locked \
RUN --mount=type=cache,from=apt-base,source=/etc/apt,target=/etc/apt,sharing=locked \
--mount=type=cache,from=apt-base,source=/var/cache/apt,target=/var/cache/apt,sharing=locked \
--mount=type=cache,from=apt-base,source=/var/lib/apt,target=/var/lib/apt,sharing=locked \
DEBIAN_FRONTEND=noninteractive apt-get install -y clang-19 llvm-19
RUN rustup component add clippy rustfmt
COPY --link --from=tools-lint /bin/checksec /usr/local/bin/
Expand All @@ -313,14 +346,13 @@ ENV CARGO_INCREMENTAL=0 \
RUSTUP_MAX_RETRIES=10
ENTRYPOINT ["/usr/local/bin/just-cargo"]

COPY --link --from=just /usr/local/bin/just /usr/local/bin/
FROM rust as rust-musl
RUN rustup target add \
aarch64-unknown-linux-musl \
x86_64-unknown-linux-musl
RUN --mount=type=cache,from=apt-base,source=/etc/apt,target=/etc/apt,ro \
RUN --mount=type=cache,from=apt-base,source=/etc/apt,target=/etc/apt,sharing=locked \
--mount=type=cache,from=apt-base,source=/var/cache/apt,target=/var/cache/apt,sharing=locked \
--mount=type=cache,from=apt-base,source=/var/lib/apt/lists,target=/var/lib/apt/lists,sharing=locked \
--mount=type=cache,from=apt-base,source=/var/lib/apt,target=/var/lib/apt,sharing=locked \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
binutils-aarch64-linux-gnu \
g++-aarch64-linux-gnu \
Expand All @@ -331,29 +363,37 @@ RUN --mount=type=cache,from=apt-base,source=/etc/apt,target=/etc/apt,ro \
## Devcontainer
##

FROM docker.io/library/debian:bookworm as devcontainer
RUN --mount=type=cache,from=apt-base,source=/etc/apt,target=/etc/apt,ro \
FROM docker.io/library/debian:${DEBIAN_RELEASE} AS devcontainer
RUN --mount=type=cache,from=apt-base,source=/etc/apt,target=/etc/apt,sharing=locked \
--mount=type=cache,from=apt-base,source=/var/cache/apt,target=/var/cache/apt,sharing=locked \
--mount=type=cache,from=apt-base,source=/var/lib/apt/lists,target=/var/lib/apt/lists,sharing=locked \
--mount=type=cache,from=apt-base,source=/var/lib/apt,target=/var/lib/apt,sharing=locked \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
cmake \
curl \
dnsutils \
file \
git \
gnupg2 \
iproute2 \
jo \
jq \
just \
libssl-dev \
locales \
lsb-release \
netcat-openbsd \
node-json5 \
pkg-config \
skopeo \
sudo \
time \
tshark \
umoci \
unzip
unzip \
yq

# consumers use j5j as the interface to stripping comments from json
RUN ln -s /usr/bin/json5 /usr/local/bin/j5j

# Link the gnu versions of ranlib to the musl toolchain.
# See: https://github.com/linkerd/linkerd2/issues/13350
Expand All @@ -369,37 +409,34 @@ RUN groupadd --gid=1000 code \
&& echo "code ALL=(root) NOPASSWD:ALL" >/etc/sudoers.d/code \
&& chmod 0440 /etc/sudoers.d/code

# git v2.34+ has new subcommands and supports code signing via SSH.
RUN --mount=type=cache,from=apt-base,source=/etc/apt,target=/etc/apt,ro \
--mount=type=cache,from=apt-base,source=/var/cache/apt,target=/var/cache/apt,sharing=locked \
--mount=type=cache,from=apt-base,source=/var/lib/apt/lists,target=/var/lib/apt/lists,sharing=locked \
DEBIAN_FRONTEND=noninteractive apt-get install -y -t bookworm-backports git

RUN --mount=type=cache,from=apt-llvm,source=/etc/apt,target=/etc/apt,ro \
RUN --mount=type=cache,from=apt-llvm,source=/etc/apt,target=/etc/apt,sharing=locked \
--mount=type=cache,from=apt-llvm,source=/var/cache/apt,target=/var/cache/apt,sharing=locked \
--mount=type=cache,from=apt-llvm,source=/var/lib/apt/lists,target=/var/lib/apt/lists,sharing=locked \
--mount=type=cache,from=apt-llvm,source=/var/lib/apt,target=/var/lib/apt,sharing=locked \
DEBIAN_FRONTEND=noninteractive apt-get install -y clang-19 llvm-19
ENV CC=clang-19 \
CXX=clang++-19

# Use microsoft's Docker setup script to install the Docker CLI.
#
# Install docker-compose since it breaks in the docker-debian script on arm64
RUN --mount=type=cache,from=apt-base,source=/etc/apt,target=/etc/apt,sharing=locked \
--mount=type=cache,from=apt-base,source=/var/cache/apt,target=/var/cache/apt,sharing=locked \
--mount=type=cache,from=apt-base,source=/var/lib/apt,target=/var/lib/apt,sharing=locked \
DEBIAN_FRONTEND=noninteractive apt-get install -y docker-compose

# devcontainers/features: install docker do not use moby (not supported on trixie)
# A distinct cache is used because the script adds an apt repo that we don't
# want to pull in for other layers.
#
# TODO(ver): replace this with a devcontainer feature?
RUN --mount=type=cache,id=apt-docker,from=apt-base,source=/etc/apt,target=/etc/apt \
--mount=type=cache,id=apt-docker,from=apt-base,source=/var/cache/apt,target=/var/cache/apt,sharing=locked \
--mount=type=cache,id=apt-docker,from=apt-base,source=/var/lib/apt/lists,target=/var/lib/apt/lists,sharing=locked \
RUN --mount=type=cache,from=apt-base,source=/etc/apt,target=/etc/apt,sharing=locked \
--mount=type=cache,from=apt-base,source=/var/cache/apt,target=/var/cache/apt,sharing=locked \
--mount=type=cache,from=apt-base,source=/var/lib/apt,target=/var/lib/apt,sharing=locked \
--mount=type=bind,from=tools,source=/bin/scurl,target=/usr/local/bin/scurl \
scurl https://raw.githubusercontent.com/microsoft/vscode-dev-containers/main/script-library/docker-debian.sh | bash -s
scurl https://raw.githubusercontent.com/devcontainers/features/refs/heads/main/src/docker-outside-of-docker/install.sh | MOBY=false bash -s
ENV DOCKER_BUILDKIT=1

ARG MARKDOWNLINT_VERSION=0.22.1
RUN --mount=type=cache,from=apt-node,source=/etc/apt,target=/etc/apt,ro \
--mount=type=cache,from=apt-node,source=/var/cache/apt,target=/var/cache/apt,sharing=locked \
--mount=type=cache,from=apt-node,source=/var/lib/apt/lists,target=/var/lib/apt/lists,sharing=locked \
DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs
RUN --mount=type=cache,from=apt-base,source=/etc/apt,target=/etc/apt,sharing=locked \
--mount=type=cache,from=apt-base,source=/var/cache/apt,target=/var/cache/apt,sharing=locked \
--mount=type=cache,from=apt-base,source=/var/lib/apt,target=/var/lib/apt,sharing=locked \
DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y nodejs npm
RUN npm install "markdownlint-cli2@${MARKDOWNLINT_VERSION}" --global

COPY --link --from=go /usr/local/go /usr/local/go
Expand Down
Loading
Loading