Skip to content

Commit 480606b

Browse files
committed
Switch Fleet Docker agent image to bci-nano
Add tini to the fleet-agent image and use it as entrypoint for stable PID 1 behavior on bci-nano.
1 parent e070490 commit 480606b

2 files changed

Lines changed: 23 additions & 2 deletions

File tree

charts/fleet-agent/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ spec:
4848
{{- end }}
4949
image: '{{ template "system_default_registry" . }}{{.Values.image.repository}}:{{.Values.image.tag}}'
5050
name: fleet-agent
51-
command:
51+
args:
5252
- fleetagent
5353
{{- if .Values.debug }}
5454
- --debug

package/Dockerfile.agent

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,29 @@
11
ARG BUILD_ENV=docker
2+
ARG BUILDPLATFORM
23
ARG TARGETPLATFORM
34
ARG TARGETARCH
45
ARG ARCH=${TARGETARCH}
56

6-
FROM --platform=linux/${ARCH} registry.suse.com/bci/bci-busybox:16.0 AS base
7+
# renovate: datasource=github-release-attachments depName=krallin/tini
8+
ARG TINI_VERSION=v0.19.0
9+
# renovate: datasource=github-release-attachments depName=krallin/tini digestVersion=v0.19.0
10+
ARG TINI_SUM_amd64=c5b0666b4cb676901f90dfcb37106783c5fe2077b04590973b885950611b30ee
11+
# renovate: datasource=github-release-attachments depName=krallin/tini digestVersion=v0.19.0
12+
ARG TINI_SUM_arm64=eae1d3aa50c48fb23b8cbdf4e369d0910dfc538566bfd09df89a774aa84a48b9
13+
14+
# Download tini binaries on the native build platform to avoid cross-build networking issues.
15+
FROM --platform=$BUILDPLATFORM registry.suse.com/bci/bci-busybox:16.0 AS tini-downloader
16+
ARG TINI_VERSION TINI_SUM_amd64 TINI_SUM_arm64
17+
RUN set -eux; \
18+
wget -qO /tini-amd64 "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static-amd64"; \
19+
echo "${TINI_SUM_amd64} /tini-amd64" | sha256sum -c -; \
20+
wget -qO /tini-arm64 "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static-arm64"; \
21+
echo "${TINI_SUM_arm64} /tini-arm64" | sha256sum -c -; \
22+
chmod 0755 /tini-amd64 /tini-arm64
23+
24+
FROM --platform=linux/${ARCH} registry.suse.com/bci/bci-nano:16.0 AS base
25+
ARG ARCH
26+
COPY --from=tini-downloader /tini-${ARCH} /usr/bin/tini
727

828
FROM base AS copy_docker
929
ONBUILD ARG ARCH
@@ -19,4 +39,5 @@ COPY ${TARGETPLATFORM}/fleetagent-linux-* /usr/bin/fleetagent
1939

2040
FROM copy_${BUILD_ENV}
2141
USER 1000
42+
ENTRYPOINT ["tini", "--"]
2243
CMD ["fleetagent"]

0 commit comments

Comments
 (0)