Skip to content

Commit

Permalink
Remove tini from Typha
Browse files Browse the repository at this point in the history
- Avoid a download in the dockerfile.
- Typha has never spawned processes (and now runs in scratch so there's nothing to spawn).
- As of the graceful shutdown work, typha responds to SIGTERM etc so no need
  for an init daemon to do it.
  • Loading branch information
fasaxc committed Dec 6, 2023
1 parent 9d33435 commit 1228a7e
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 28 deletions.
7 changes: 0 additions & 7 deletions typha/docker-image/Dockerfile.amd64
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ ARG UBI_IMAGE

FROM ${UBI_IMAGE} as ubi

# Since our binary isn't designed to run as PID 1, run it via the tini init daemon.
ENV TINI_VERSION v0.18.0
COPY https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static-amd64 /sbin/tini
RUN chmod +x /sbin/tini

# Add in top-level license file
RUN mkdir /licenses
COPY licenses /licenses
Expand All @@ -37,7 +32,6 @@ LABEL name="Calico Typha" \
description="Calico Typha is a fan-out datastore proxy" \
maintainer="Shaun Crampton <shaun@tigera.io>"

COPY --from=ubi /sbin/tini /sbin/tini
COPY --from=ubi /licenses /licenses

COPY --from=ubi /usr/include /usr/include
Expand Down Expand Up @@ -67,5 +61,4 @@ ENV PATH="$PATH:/code"

USER 999
# Run Typha by default
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["calico-typha"]
7 changes: 0 additions & 7 deletions typha/docker-image/Dockerfile.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,7 @@ MAINTAINER Shaun Crampton <shaun@tigera.io>
# when running on a kernel >= 4.8, this will become less relevant
COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/

# Since our binary isn't designed to run as PID 1, run it via the tini init daemon.
ENV TINI_VERSION v0.18.0
COPY https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static-arm64 /sbin/tini
RUN chmod +x /sbin/tini

FROM scratch
COPY --from=base /sbin/tini /sbin/tini

# Put our binary in /code rather than directly in /usr/bin. This allows the downstream builds
# to more easily extract the build artefacts from the container.
Expand All @@ -43,5 +37,4 @@ ENV PATH "$PATH:/code"

USER 999
# Run Typha by default
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["calico-typha"]
7 changes: 0 additions & 7 deletions typha/docker-image/Dockerfile.ppc64le
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,7 @@ MAINTAINER Shaun Crampton <shaun@tigera.io>
# when running on a kernel >= 4.8, this will become less relevant
COPY --from=qemu /usr/bin/qemu-ppc64le-static /usr/bin/

# Since our binary isn't designed to run as PID 1, run it via the tini init daemon.
ENV TINI_VERSION v0.18.0
COPY https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static-ppc64el /sbin/tini
RUN chmod +x /sbin/tini

FROM scratch
COPY --from=base /sbin/tini /sbin/tini

# Put our binary in /code rather than directly in /usr/bin. This allows the downstream builds
# to more easily extract the build artefacts from the container.
Expand All @@ -43,5 +37,4 @@ ENV PATH "$PATH:/code"

USER 999
# Run Typha by default
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["calico-typha"]
7 changes: 0 additions & 7 deletions typha/docker-image/Dockerfile.s390x
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,7 @@ MAINTAINER LoZ Open Source Ecosystem (https://www.ibm.com/developerworks/communi
# when running on a kernel >= 4.8, this will become less relevant
COPY --from=qemu /usr/bin/qemu-*-static /usr/bin/

# Since our binary isn't designed to run as PID 1, run it via the tini init daemon.
ENV TINI_VERSION v0.18.0
COPY https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static-s390x /sbin/tini
RUN chmod +x /sbin/tini

FROM scratch
COPY --from=base /sbin/tini /sbin/tini

# Put our binary in /code rather than directly in /usr/bin. This allows the downstream builds
# to more easily extract the build artefacts from the container.
Expand All @@ -43,5 +37,4 @@ ENV PATH "$PATH:/code"

USER 999
# Run Typha by default
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["calico-typha"]

0 comments on commit 1228a7e

Please sign in to comment.