Skip to content

Commit c3108a0

Browse files
committed
chore(sdk): use Debian's Docker Hardened Image
Using trivy to scan vulnerabilities in Docker images, we found that: BEFORE: Total: 97 (UNKNOWN: 2, LOW: 82, MEDIUM: 13, HIGH: 0, CRITICAL: 0) AFTER : Total: 88 (UNKNOWN: 2, LOW: 76, MEDIUM: 10, HIGH: 0, CRITICAL: 0)
1 parent 3fc5f86 commit c3108a0

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

packages/sdk/Dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,10 @@ RUN <<EOF
108108
apt-get install -y --no-install-recommends \
109109
libslirp0 \
110110
lua5.4 \
111+
passwd \
111112
xz-utils
112-
rm -rf /var/lib/apt/lists/*
113-
EOF
114113

115-
RUN <<EOF
116-
set -e
114+
# create cartesi user
117115
useradd \
118116
--comment "cartesi user" \
119117
--no-create-home \
@@ -123,6 +121,9 @@ useradd \
123121
--uid 102 \
124122
--user-group \
125123
cartesi
124+
125+
apt-get remove -y --purge passwd
126+
rm -rf /var/lib/apt/lists/*
126127
EOF
127128

128129
# Install cartesi-machine emulator
@@ -265,9 +266,7 @@ apt-get install -y --no-install-recommends \
265266
liblzo2-2 \
266267
libslirp0 \
267268
locales \
268-
lua5.4 \
269-
xxd \
270-
xz-utils
269+
xxd
271270
rm -rf /var/lib/apt/lists/*
272271
EOF
273272

packages/sdk/docker-bake.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ target "default" {
88
args = {
99
ALTO_VERSION = "1.2.5"
1010
ALTO_PACKAGE_VERSION = "0.0.18"
11-
CARTESI_BASE_IMAGE = "docker.io/library/debian:trixie-20260112-slim@sha256:e9f1b0bda36daad09fcd6779f7af47191dbee4ff52f8903fffd15240eb986bd8"
11+
CARTESI_BASE_IMAGE = "dhi.io/debian-base:trixie@sha256:1244523a2f7b6c096c6f98ce0349df6798c775c57322c51f8a4982daf60c256c"
1212
CARTESI_DEVNET_VERSION = "2.0.0-alpha.9"
1313
CARTESI_IMAGE_KERNEL_VERSION = "0.20.0"
1414
CARTESI_LINUX_KERNEL_VERSION = "6.5.13-ctsi-1-v0.20.0"

0 commit comments

Comments
 (0)