Skip to content

Commit d40e27a

Browse files
committed
Dockerfile: Bump base Ubuntu to 24.04
The base image used for building KBS (`rust:slim`) was recently updated, and its toolchain now requires glibc 2.38. However, the runtime base image is still `ubuntu:22.04`, which only provides glibc 2.35. This mismatch causes runtime errors, e.g.: ``` /usr/local/bin/kbs: /lib/s390x-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /usr/local/bin/kbs) ``` This commit updates the runtime image to `ubuntu:24.04` to match the required glibc version. Additionally, the update pins the image by digest rather than tag to prevent similar regressions. Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
1 parent b3b8820 commit d40e27a

6 files changed

Lines changed: 24 additions & 12 deletions

File tree

attestation-service/docker/as-grpc/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
# SPDX-License-Identifier: Apache-2.0
44

5-
FROM --platform=${BUILDPLATFORM:-linux/amd64} docker.io/library/rust:latest AS builder
5+
FROM --platform=${BUILDPLATFORM:-linux/amd64} \
6+
docker.io/library/rust@sha256:6e6d04bd50cd4c433a805c58c13f186a508c5b5417b9b61cae40ec28e0593c51 \
7+
AS builder # rust:1.89.0
68
ARG ARCH=x86_64
79
ARG VERIFIER=all-verifier
810

@@ -30,7 +32,7 @@ RUN if [ "$(uname -m)" != "${ARCH}" ]; then \
3032
cargo install --path attestation-service --bin grpc-as --features grpc-bin,${VERIFIER} --locked ${TARGET_FLAG}
3133

3234

33-
FROM ubuntu:22.04
35+
FROM ubuntu@sha256:7c06e91f61fa88c08cc74f7e1b7c69ae24910d745357e0dfe1d2c0322aaf20f9 # ubuntu:24.04
3436
ARG ARCH=x86_64
3537
ARG VERIFIER=all-verifier
3638

attestation-service/docker/as-restful/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
# SPDX-License-Identifier: Apache-2.0
44

5-
FROM --platform=${BUILDPLATFORM:-linux/amd64} docker.io/library/rust:latest AS builder
5+
FROM --platform=${BUILDPLATFORM:-linux/amd64} \
6+
docker.io/library/rust@sha256:6e6d04bd50cd4c433a805c58c13f186a508c5b5417b9b61cae40ec28e0593c51 \
7+
AS builder # rust:1.89.0
68
ARG ARCH=x86_64
79
ARG VERIFIER=all-verifier
810

@@ -29,7 +31,8 @@ RUN if [ "$(uname -m)" != "${ARCH}" ]; then \
2931
rustup target add ${RUSTC_TARGET}; fi; \
3032
cargo install --path attestation-service --bin restful-as --features restful-bin,${VERIFIER} --locked ${TARGET_FLAG}
3133

32-
FROM ubuntu:22.04
34+
FROM ubuntu@sha256:7c06e91f61fa88c08cc74f7e1b7c69ae24910d745357e0dfe1d2c0322aaf20f9 # ubuntu:24.04
35+
3336
ARG ARCH=x86_64
3437
ARG VERIFIER=all-verifier
3538

kbs/docker/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
FROM --platform=${BUILDPLATFORM:-linux/amd64} docker.io/library/rust:slim AS builder
1+
FROM --platform=${BUILDPLATFORM:-linux/amd64} \
2+
docker.io/library/rust@sha256:6c828d9865870a3bc8c02919d73803df22cac59b583d8f2cb30a296abe64748f \
3+
AS builder # rust:1.89.0-slim
24
ARG ARCH=x86_64
35
ARG ALIYUN=false
46

@@ -41,14 +43,15 @@ COPY . .
4143
RUN cd kbs && make AS_FEATURE=coco-as-builtin ALIYUN=${ALIYUN} ARCH=${ARCH} && \
4244
make ARCH=${ARCH} install-kbs
4345

44-
FROM ubuntu:22.04
46+
FROM ubuntu@sha256:7c06e91f61fa88c08cc74f7e1b7c69ae24910d745357e0dfe1d2c0322aaf20f9 # ubuntu:24.04
4547
ARG ARCH=x86_64
4648

4749
WORKDIR /tmp
4850

4951
RUN apt-get update && \
5052
apt-get install -y \
5153
curl \
54+
gnupg \
5255
gnupg-agent && \
5356
if [ "${ARCH}" = "x86_64" ]; then curl -fsSL https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | \
5457
gpg --dearmor --output /usr/share/keyrings/intel-sgx.gpg && \

kbs/docker/coco-as-grpc/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
FROM --platform=${BUILDPLATFORM:-linux/amd64} docker.io/library/rust:latest AS builder
1+
FROM --platform=${BUILDPLATFORM:-linux/amd64} \
2+
docker.io/library/rust@sha256:6e6d04bd50cd4c433a805c58c13f186a508c5b5417b9b61cae40ec28e0593c51 \
3+
AS builder # rust:1.89.0
24
ARG BUILDPLATFORM=linux/amd64
35
ARG ARCH=x86_64
46
ARG ALIYUN=false
@@ -30,7 +32,7 @@ RUN if [ "${NEBULA_CA_PLUGIN}" = "true" ]; then \
3032
touch /usr/local/bin/nebula-cert-dummy; \
3133
fi
3234

33-
FROM ubuntu:22.04
35+
FROM ubuntu@sha256:7c06e91f61fa88c08cc74f7e1b7c69ae24910d745357e0dfe1d2c0322aaf20f9 # ubuntu:24.04
3436

3537
LABEL org.opencontainers.image.source="https://github.com/confidential-containers/trustee/kbs"
3638

kbs/docker/intel-trust-authority/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
FROM docker.io/library/rust:latest AS builder
1+
FROM docker.io/library/rust@sha256:6e6d04bd50cd4c433a805c58c13f186a508c5b5417b9b61cae40ec28e0593c51 \
2+
AS builder # rust:1.89.0
23
ARG ALIYUN=false
34

45
WORKDIR /usr/src/kbs
@@ -10,7 +11,7 @@ RUN apt-get update && apt install -y git
1011
RUN cd kbs && make AS_FEATURE=intel-trust-authority-as ALIYUN=${ALIYUN} && \
1112
make install-kbs
1213

13-
FROM ubuntu:22.04
14+
FROM ubuntu@sha256:7c06e91f61fa88c08cc74f7e1b7c69ae24910d745357e0dfe1d2c0322aaf20f9 # ubuntu:24.04
1415

1516
LABEL org.opencontainers.image.source="https://github.com/confidential-containers/trustee/kbs"
1617

kbs/docker/kbs-client-image/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
FROM docker.io/library/rust:1.85.1 AS builder
1+
FROM docker.io/library/rust@sha256:e51d0265072d2d9d5d320f6a44dde6b9ef13653b035098febd68cce8fa7c0bc4 \
2+
AS builder # rust:1.85.1
23

34
WORKDIR /usr/src/kbs
45
COPY . .
@@ -9,6 +10,6 @@ RUN apt-get update && apt-get install -y pkg-config libssl-dev git sudo
910
RUN cd kbs && make cli-static-linux && \
1011
cp ../target/$(uname -m)-unknown-linux-gnu/release/kbs-client /
1112

12-
FROM ubuntu:22.04
13+
FROM ubuntu@sha256:7c06e91f61fa88c08cc74f7e1b7c69ae24910d745357e0dfe1d2c0322aaf20f9 # ubuntu:24.04
1314

1415
COPY --from=builder /kbs-client /usr/local/bin/kbs-client

0 commit comments

Comments
 (0)