-
Notifications
You must be signed in to change notification settings - Fork 280
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
Add tini to allow termination signal handling #3320
base: main
Are you sure you want to change the base?
Changes from 1 commit
86ae4f1
6d36279
0e28a5b
e31832a
5c6669c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,12 +52,17 @@ FROM amazonlinux:2 | |
ARG UID=1000 | ||
ARG GID=1000 | ||
ARG OPENSEARCH_DASHBOARDS_HOME=/usr/share/opensearch-dashboards | ||
ENV TINI_VERSION=v0.19.0 | ||
|
||
# Update packages | ||
# Install the tools we need: tar and gzip to unpack the OpenSearch tarball, and shadow-utils to give us `groupadd` and `useradd`. | ||
# Install which to allow running of securityadmin.sh | ||
RUN yum update -y && yum install -y tar gzip shadow-utils which && yum clean all | ||
|
||
# Add tini to use as init (PID1) process. | ||
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /bin/tini | ||
RUN chmod +x /bin/tini | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I kinda prefer to not make it globally available, and add full path in the entrypoint. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. probably use 755 specifically instead of +x so it is precise? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good, updated the chmod to 755. Open to path suggestions where we can keep this binary There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As of path, just use |
||
|
||
# Install Reporting dependencies | ||
RUN yum install -y libnss3.so xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-utils xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 xorg-x11-fonts-misc fontconfig freetype && yum clean all | ||
|
||
|
@@ -93,5 +98,5 @@ LABEL org.label-schema.schema-version="1.0" \ | |
org.label-schema.build-date="$BUILD_DATE" | ||
|
||
# CMD to run | ||
ENTRYPOINT ["./opensearch-dashboards-docker-entrypoint.sh"] | ||
ENTRYPOINT ["tini", "--", "./opensearch-dashboards-docker-entrypoint.sh"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it possible to use ENTRYPOINT + CMD together?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure about this since this may change behavior for existing invocations, but AFAICS non- There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems like you add this now? |
||
CMD ["opensearch-dashboards"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wont work as this download is only the x64 version, will crash on the arm64 here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need code to handle download for x64 vs arm64.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the download source according to the TARGETARCH supplied by docker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TARGETARCH seems only support multi-arch building?
Tried on the single arch build script and it could not figure out arch.
https://docs.docker.com/desktop/extensions-sdk/extensions/multi-arch/#adding-multi-arch-binaries
Although we release for multi-arch we also want to support single-arch if people want to build in their local.
Probably add this in the build-image-single-arch.sh?