@@ -20,6 +20,7 @@ RUN apt-get update \
2020 skopeo buildah \
2121 jq \
2222 unzip \
23+ xz-utils \
2324 && apt-get autoremove -y \
2425 && apt-get clean \
2526 && rm -rf /var/lib/apt/lists/*
@@ -162,6 +163,37 @@ RUN curl -sSL -o /tmp/oasdiff.tgz \
162163 && chmod +x /usr/local/bin/oasdiff \
163164 && rm -f /tmp/oasdiff.tgz
164165
166+ # Rust toolchain (velmios-aws-lambdas / cargo-lambda CI)
167+ ARG RUST_VERSION=1.97.1
168+ ENV RUSTUP_HOME=/usr/local/rustup \
169+ CARGO_HOME=/usr/local/cargo \
170+ PATH=/usr/local/cargo/bin:${PATH}
171+ # hadolint ignore=DL4006
172+ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
173+ | sh -s -- -y --default-toolchain "${RUST_VERSION}" --profile minimal \
174+ && chmod -R a+rX /usr/local/rustup /usr/local/cargo \
175+ && rustc --version && cargo --version
176+
177+ # Zig linker for cargo-lambda arm64 cross-builds.
178+ # 0.14.0 uses zig-linux-x86_64-*; 0.14.1+ renamed to zig-x86_64-linux-* — update URL on bump.
179+ ARG ZIG_VERSION=0.14.0
180+ RUN curl -sSL -o /tmp/zig.tar.xz \
181+ "https://ziglang.org/download/${ZIG_VERSION}/zig-linux-x86_64-${ZIG_VERSION}.tar.xz" \
182+ && tar -xJf /tmp/zig.tar.xz -C /usr/local \
183+ && mv "/usr/local/zig-linux-x86_64-${ZIG_VERSION}" /usr/local/zig \
184+ && ln -sf /usr/local/zig/zig /usr/local/bin/zig \
185+ && rm -f /tmp/zig.tar.xz \
186+ && zig version
187+
188+ # cargo-lambda (AWS Lambda Rust packaging)
189+ ARG CARGO_LAMBDA_VERSION=1.9.1
190+ RUN curl -sSL -o /tmp/cargo-lambda.tgz \
191+ "https://github.com/cargo-lambda/cargo-lambda/releases/download/v${CARGO_LAMBDA_VERSION}/cargo-lambda-v${CARGO_LAMBDA_VERSION}.x86_64-unknown-linux-musl.tar.gz" \
192+ && tar -xzf /tmp/cargo-lambda.tgz -C /usr/local/bin cargo-lambda \
193+ && chmod +x /usr/local/bin/cargo-lambda \
194+ && rm -f /tmp/cargo-lambda.tgz \
195+ && cargo lambda --version
196+
165197# Install pre-commit
166198# hadolint ignore=DL3013
167199RUN pip3 install --no-cache-dir pre-commit
@@ -198,4 +230,4 @@ RUN chmod +x /tmp/cache_actions.sh \
198230 && rm -f /tmp/manifest.yaml /tmp/cache_actions.sh
199231
200232# Add user tool paths to interactive shell PATH
201- RUN echo "export PATH=\" /usr/local/bin:${APP_HOME}/.uv/bin:${APP_HOME}/.poetry/bin:${APP_HOME}/.local/bin:\$ PATH\" " >> ~/.bashrc
233+ RUN echo "export PATH=\" /usr/local/bin:/usr/local/cargo/bin: ${APP_HOME}/.uv/bin:${APP_HOME}/.poetry/bin:${APP_HOME}/.local/bin:\$ PATH\" " >> ~/.bashrc
0 commit comments