Skip to content

Commit c664bf2

Browse files
bugerclaude
andcommitted
feat(ci): use tykio/dhi-busybox:1.37-fips as base image for Docker builds
Replace the debian-based and distroless base images with tykio/dhi-busybox:1.37-fips for amd64 and arm64 architectures. Both Dockerfiles now use a multi-stage build: a Debian stage extracts the .deb package, then the final stage uses the FIPS-compliant busybox base image. s390x retains the original fallback images since no FIPS base is available for that architecture. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 855e97a commit c664bf2

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

ci/Dockerfile.distroless

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@ ENV DEBIAN_FRONTEND=noninteractive
1010
COPY ${BUILD_PACKAGE_NAME}_*${TARGETARCH}.deb /
1111
RUN dpkg -i /${BUILD_PACKAGE_NAME}_*${TARGETARCH}.deb && rm /*.deb
1212

13-
FROM gcr.io/distroless/base-debian12:latest
13+
# FIPS base for amd64/arm64
14+
FROM tykio/dhi-busybox:1.37-fips AS base-amd64
15+
FROM tykio/dhi-busybox:1.37-fips AS base-arm64
16+
# Fallback for s390x (no FIPS base available)
17+
FROM gcr.io/distroless/base-debian12:latest AS base-s390x
18+
19+
FROM base-${TARGETARCH}
20+
ARG TARGETARCH
1421

1522
COPY --from=deb /opt/tyk-gateway /opt/tyk-gateway
1623

ci/Dockerfile.std

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,24 @@
11
# Generated by: gromit policy
22

3-
FROM debian:trixie-slim
3+
FROM debian:trixie-slim AS deb
44
ARG TARGETARCH
55
ARG BUILD_PACKAGE_NAME
66

77
ENV DEBIAN_FRONTEND=noninteractive
88

9-
RUN apt-get update \
10-
&& apt-get dist-upgrade -y ca-certificates
9+
COPY dist/${BUILD_PACKAGE_NAME}_*_${TARGETARCH}.deb /
10+
RUN dpkg -i /${BUILD_PACKAGE_NAME}_*_${TARGETARCH}.deb && rm /*.deb
1111

12-
# Remove some things to decrease CVE surface
13-
RUN dpkg --purge --force-remove-essential curl ncurses-base || true
14-
RUN rm -fv /usr/bin/passwd /usr/sbin/adduser || true
12+
# FIPS base for amd64/arm64
13+
FROM tykio/dhi-busybox:1.37-fips AS base-amd64
14+
FROM tykio/dhi-busybox:1.37-fips AS base-arm64
15+
# Fallback for s390x (no FIPS base available)
16+
FROM debian:trixie-slim AS base-s390x
1517

16-
# Comment this to test in dev
17-
COPY dist/${BUILD_PACKAGE_NAME}_*_${TARGETARCH}.deb /
18-
RUN dpkg -i /${BUILD_PACKAGE_NAME}_*_${TARGETARCH}.deb && find / -maxdepth 1 -name "*.deb" -delete
19-
20-
# Clean up caches, unwanted .a and .o files
21-
RUN rm -rf /root/.cache \
22-
&& apt-get -y autoremove \
23-
&& apt-get clean \
24-
&& rm -rf /usr/include/* /var/cache/apt/archives /var/lib/apt /var/lib/cache /var/log/* \
25-
&& find /usr/lib -type f -name '*.a' -o -name '*.o' -delete
18+
FROM base-${TARGETARCH}
19+
ARG TARGETARCH
20+
21+
COPY --from=deb /opt/tyk-gateway /opt/tyk-gateway
2622

2723
ARG PORTS
2824

0 commit comments

Comments
 (0)