File tree Expand file tree Collapse file tree 1 file changed +17
-11
lines changed
Expand file tree Collapse file tree 1 file changed +17
-11
lines changed Original file line number Diff line number Diff line change 1- FROM rust:1.88.0 AS builder
2- WORKDIR /usr/src/echo
3- COPY . .
4- RUN rustup install nightly && rustup default nightly && cargo build --release
5-
6-
7- FROM debian:bookworm-slim
1+ FROM debian:trixie-slim
2+ ARG BINS_VERSION=0.1.47
3+ ARG ECHO_VERSION=0.1.0
4+ ARG ECHO_SHA256_amd64=da08855d7d5357630aba2da044467773b7e4de806204ea984dc2d11782032885
5+ ARG ECHO_SHA256_arm64=4fe0bbbeeec8b03c3b7bc9d70815153fe5651494c8d63220b33f66d75674ddc9
6+ ARG TARGETARCH
87RUN --mount=type=tmpfs,target=/var/cache/apt \
98 --mount=type=tmpfs,target=/var/lib/apt/lists \
109 apt-get -qq update \
11- && apt-get -qq install -y libssl-dev ca-certificates
12- COPY --from=builder \
13- /usr/src/echo/target/release/example-echo \
14- /usr/local/bin/example-echo
10+ && apt-get -qq install -y libssl-dev ca-certificates curl \
11+ && test -n "${TARGETARCH}" || (echo "Error: TARGETARCH build arg must be set" && exit 1) \
12+ && curl -fsSL "https://github.com/envoyproxy/toolshed/releases/download/bins-v${BINS_VERSION}/echo-${ECHO_VERSION}-${TARGETARCH}" \
13+ -o /usr/local/bin/example-echo \
14+ && case "${TARGETARCH}" in \
15+ amd64) EXPECTED_SHA="${ECHO_SHA256_amd64}" ;; \
16+ arm64) EXPECTED_SHA="${ECHO_SHA256_arm64}" ;; \
17+ *) echo "Unsupported architecture: ${TARGETARCH}" && exit 1 ;; \
18+ esac \
19+ && echo "${EXPECTED_SHA} /usr/local/bin/example-echo" | sha256sum -c - \
20+ && chmod +x /usr/local/bin/example-echo
1521EXPOSE 8080
1622COPY <<EOF /etc/config.yaml
1723listeners:
You can’t perform that action at this time.
0 commit comments