Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[build] Adds a mini-init process for Docker #56866

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ffdb31563e34bca91a094f962544b9d31f5d138432f2d639a0856ff605b3a69f47e48191da42d6956ab62a1b24eafca1a95b299901257832225d26770354ce5e /tini
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,26 @@ function generator({
RUN chmod -R g=u /usr/share/kibana
RUN find /usr/share/kibana -type d -exec chmod g+s {} \\;
# "tini" is a tiny but valid init for containers. This is used to cleanly
# control how ES and any child processes are shut down.
#
# The tini GitHub page gives instructions for verifying the binary using
# gpg, but the keyservers are slow to return the key and this can fail the
# build. Instead, we check the binary against a checksum that we have
# computed.
ADD https://github.com/krallin/tini/releases/download/v0.18.0/tini /tini
COPY config/tini.sha512 /tini.sha512
RUN sha512sum -c /tini.sha512 && chmod +x /tini
################################################################################
# Build stage 1
# Copy prepared files from the previous stage and complete the image.
################################################################################
FROM ${baseOSImage}
EXPOSE 5601
COPY --from=builder /tini /tini
# Add Reporting dependencies.
RUN ${packageManager()} update -y && ${packageManager()} install -y fontconfig freetype shadow-utils && ${packageManager()} clean all
Expand Down Expand Up @@ -120,7 +133,7 @@ function generator({
org.label-schema.build-date="${dockerBuildDate}" \\
license="${license}"
ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
ENTRYPOINT ["/tini", "--", "/usr/local/bin/dumb-init", "--"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there overlap between tini and dumb-init? should we remove dumb-init?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, totally spaced on that.

CMD ["/usr/local/bin/kibana-docker"]
`);
Expand Down