Skip to content

Commit 8021e5f

Browse files
authored
fix: use same runtime image as builder (#3124)
## Description * Using Debian Bookworm as the runtime base image for Docker builds. This is the same base image as the Rust builder images. Keeping the images in-sync will help prevent runtime dependency mismatch issues. * Adding `curl` and other basic debug commands to image to remove external runtime dependency (curl is used in container init when deployed). ## Checklist - [ ] Breaking changes are clearly marked as such in the PR description and changelog - [ ] New behavior is reflected in tests - [ ] [The specification](https://github.com/FuelLabs/fuel-specs/) matches the implemented behavior (link update PR if changes are needed) ### Before requesting review - [x] I have reviewed the code myself - [ ] I have created follow-up issues caused by this PR and linked them here ### After merging, notify other teams [Add or remove entries as needed] - [ ] [Rust SDK](https://github.com/FuelLabs/fuels-rs/) - [ ] [Sway compiler](https://github.com/FuelLabs/sway/) - [ ] [Platform documentation](https://github.com/FuelLabs/devrel-requests/issues/new?assignees=&labels=new+request&projects=&template=NEW-REQUEST.yml&title=%5BRequest%5D%3A+) (for out-of-organization contributors, the person merging the PR will do this) - [ ] Someone else?
1 parent a30446a commit 8021e5f

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.changes/fixed/3124.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Using Debian Bookworm as the runtime base image for Docker builds. This is the same base image as the Rust builder images. Keeping the images in-sync will help prevent runtime dependency mismatch issues.

deployment/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Stage 1: Build
22
FROM --platform=$BUILDPLATFORM tonistiigi/xx AS xx
3-
FROM --platform=$BUILDPLATFORM rust:1.90.0 AS chef
3+
FROM --platform=$BUILDPLATFORM rust:1.90.0-bookworm AS chef
44

55
ARG TARGETPLATFORM
66
RUN cargo install cargo-chef && rustup target add wasm32-unknown-unknown
@@ -65,7 +65,7 @@ RUN \
6565
&& cp ./target/$(xx-cargo --print-target-triple)/release/fuel-core.d /root/fuel-core.d
6666

6767
# Stage 2: Run
68-
FROM ubuntu:22.04 AS run
68+
FROM debian:bookworm-slim AS run
6969

7070
ARG IP=0.0.0.0
7171
ARG PORT=4000
@@ -79,7 +79,7 @@ ENV DB_PATH="${DB_PATH}"
7979
WORKDIR /root/
8080

8181
RUN apt-get update -y \
82-
&& apt-get install -y --no-install-recommends ca-certificates \
82+
&& apt-get install -y --no-install-recommends ca-certificates curl procps iputils-ping jq \
8383
# Clean up
8484
&& apt-get autoremove -y \
8585
&& apt-get clean -y \

deployment/e2e-client.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Stage 1: Build
2-
FROM rust:1.90.0 AS chef
2+
FROM rust:1.90.0-bookworm AS chef
33
RUN cargo install cargo-chef && rustup target add wasm32-unknown-unknown
44
WORKDIR /build/
55
# hadolint ignore=DL3008
@@ -38,7 +38,7 @@ RUN \
3838
&& cp ./target/release/fuel-core-e2e-client.d /root/fuel-core-e2e-client.d
3939

4040
# Stage 2: Run
41-
FROM ubuntu:22.04 as run
41+
FROM debian:bookworm-slim as run
4242

4343
WORKDIR /root/
4444

0 commit comments

Comments
 (0)