Skip to content

Commit

Permalink
ironbank: enable /usr/bin/tini (#37289)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Dec 5, 2023
1 parent dfdd982 commit d533d8f
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dev-tools/packaging/templates/ironbank/auditbeat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ COPY LICENSE /licenses/elastic-${ELASTIC_PRODUCT}
# Add a dumb init process
COPY tinit /tinit
RUN chmod +x /tinit
# Help with supporting the override in the ECK entrypoint
# https://github.com/elastic/cloud-on-k8s/blob/272fd0f2b344b1f86f04decb561eceab8a5a3254/pkg/controller/agent/pod.go#L455
# TODO: eventually /tinit will be replaced by /usr/bin/tini
RUN ln -s /tinit /usr/bin/tini

# Bring in product from the initial stage.
COPY --from=builder --chown=1000:0 /usr/share/${ELASTIC_PRODUCT} /usr/share/${ELASTIC_PRODUCT}
Expand Down Expand Up @@ -74,6 +78,7 @@ RUN groupadd --gid 1000 ${ELASTIC_PRODUCT} && useradd --uid 1000 --gid 1000 --gr
USER ${ELASTIC_PRODUCT}
ENV ELASTIC_PRODUCT=${ELASTIC_PRODUCT}

# TODO: eventually /tinit will be replaced by /usr/bin/tini
ENTRYPOINT ["/tinit", "--", "/usr/share/auditbeat/auditbeat", "-E", "http.enabled=true", "-E", "http.host=unix:///usr/share/auditbeat/data/auditbeat.sock"]
CMD ["-environment", "container"]

Expand Down
5 changes: 5 additions & 0 deletions dev-tools/packaging/templates/ironbank/filebeat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ COPY LICENSE /licenses/elastic-${ELASTIC_PRODUCT}
# Add a dumb init process
COPY tinit /tinit
RUN chmod +x /tinit
# Help with supporting the override in the ECK entrypoint
# https://github.com/elastic/cloud-on-k8s/blob/272fd0f2b344b1f86f04decb561eceab8a5a3254/pkg/controller/agent/pod.go#L455
# TODO: eventually /tinit will be replaced by /usr/bin/tini
RUN ln -s /tinit /usr/bin/tini

# Bring in product from the initial stage.
COPY --from=builder --chown=1000:0 /usr/share/${ELASTIC_PRODUCT} /usr/share/${ELASTIC_PRODUCT}
Expand Down Expand Up @@ -74,6 +78,7 @@ RUN groupadd --gid 1000 ${ELASTIC_PRODUCT} && useradd --uid 1000 --gid 1000 --gr
USER ${ELASTIC_PRODUCT}
ENV ELASTIC_PRODUCT=${ELASTIC_PRODUCT}

# TODO: eventually /tinit will be replaced by /usr/bin/tini
ENTRYPOINT ["/tinit", "--", "/usr/share/filebeat/filebeat", "-E", "http.enabled=true", "-E", "http.host=unix:///usr/share/filebeat/data/filebeat.sock"]
CMD ["-environment", "container"]

Expand Down
5 changes: 5 additions & 0 deletions dev-tools/packaging/templates/ironbank/heartbeat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ COPY LICENSE /licenses/elastic-${ELASTIC_PRODUCT}
# Add a dumb init process
COPY tinit /tinit
RUN chmod +x /tinit
# Help with supporting the override in the ECK entrypoint
# https://github.com/elastic/cloud-on-k8s/blob/272fd0f2b344b1f86f04decb561eceab8a5a3254/pkg/controller/agent/pod.go#L455
# TODO: eventually /tinit will be replaced by /usr/bin/tini
RUN ln -s /tinit /usr/bin/tini

# Bring in product from the initial stage.
COPY --from=prep_files --chown=1000:0 /usr/share/${ELASTIC_PRODUCT} /usr/share/${ELASTIC_PRODUCT}
Expand Down Expand Up @@ -74,6 +78,7 @@ RUN groupadd --gid 1000 ${ELASTIC_PRODUCT} && useradd --uid 1000 --gid 1000 --gr
USER ${ELASTIC_PRODUCT}
ENV ELASTIC_PRODUCT=${ELASTIC_PRODUCT}

# TODO: eventually /tinit will be replaced by /usr/bin/tini
ENTRYPOINT ["/tinit", "--", "/usr/share/heartbeat/heartbeat", "-E", "http.enabled=true", "-E", "http.host=unix:///usr/share/heartbeat/data/heartbeat.sock"]
CMD ["-environment", "container"]

Expand Down
5 changes: 5 additions & 0 deletions dev-tools/packaging/templates/ironbank/metricbeat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ COPY LICENSE /licenses/elastic-${ELASTIC_PRODUCT}
# Add a dumb init process
COPY tinit /tinit
RUN chmod +x /tinit
# Help with supporting the override in the ECK entrypoint
# https://github.com/elastic/cloud-on-k8s/blob/272fd0f2b344b1f86f04decb561eceab8a5a3254/pkg/controller/agent/pod.go#L455
# TODO: eventually /tinit will be replaced by /usr/bin/tini
RUN ln -s /tinit /usr/bin/tini

# Bring in product from the initial stage.
COPY --from=builder --chown=1000:0 /usr/share/${ELASTIC_PRODUCT} /usr/share/${ELASTIC_PRODUCT}
Expand Down Expand Up @@ -75,6 +79,7 @@ RUN groupadd --gid 1000 ${ELASTIC_PRODUCT} && useradd --uid 1000 --gid 1000 --gr
USER ${ELASTIC_PRODUCT}
ENV ELASTIC_PRODUCT=${ELASTIC_PRODUCT}

# TODO: eventually /tinit will be replaced by /usr/bin/tini
ENTRYPOINT ["/tinit", "--", "/usr/share/metricbeat/metricbeat", "-E", "http.enabled=true", "-E", "http.host=unix:///usr/share/metricbeat/data/metricbeat.sock"]
CMD ["-environment", "container"]

Expand Down
5 changes: 5 additions & 0 deletions dev-tools/packaging/templates/ironbank/packetbeat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ COPY LICENSE /licenses/elastic-${ELASTIC_PRODUCT}
# Add a dumb init process
COPY tinit /tinit
RUN chmod +x /tinit
# Help with supporting the override in the ECK entrypoint
# https://github.com/elastic/cloud-on-k8s/blob/272fd0f2b344b1f86f04decb561eceab8a5a3254/pkg/controller/agent/pod.go#L455
# TODO: eventually /tinit will be replaced by /usr/bin/tini
RUN ln -s /tinit /usr/bin/tini

# Bring in product from the initial stage.
COPY --from=builder --chown=1000:0 /usr/share/${ELASTIC_PRODUCT} /usr/share/${ELASTIC_PRODUCT}
Expand Down Expand Up @@ -76,6 +80,7 @@ RUN groupadd --gid 1000 ${ELASTIC_PRODUCT} && useradd --uid 1000 --gid 1000 --gr
USER root
ENV ELASTIC_PRODUCT=${ELASTIC_PRODUCT}

# TODO: eventually /tinit will be replaced by /usr/bin/tini
ENTRYPOINT ["/tinit", "--", "/usr/share/packetbeat/packetbeat", "-E", "http.enabled=true", "-E", "http.host=unix:///usr/share/packetbeat/data/packetbeat.sock"]
CMD ["-environment", "container"]

Expand Down

0 comments on commit d533d8f

Please sign in to comment.