Skip to content

Commit

Permalink
Download arch-specific tini binary, update perms
Browse files Browse the repository at this point in the history
Signed-off-by: shikharbhardwaj <[email protected]>
  • Loading branch information
shikharbhardwaj committed Apr 29, 2023
1 parent 86ae4f1 commit 6d36279
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ RUN tar -xzpf $TEMP_DIR/opensearch-dashboards-`uname -p`.tgz -C $OPENSEARCH_DASH
# Copy working directory to the actual release docker images
FROM amazonlinux:2

ARG TARGETARCH
ARG UID=1000
ARG GID=1000
ARG OPENSEARCH_DASHBOARDS_HOME=/usr/share/opensearch-dashboards
Expand All @@ -60,8 +61,8 @@ ENV TINI_VERSION=v0.19.0
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
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${TARGETARCH} /bin/tini
RUN chmod 755 /bin/tini

# 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
Expand Down Expand Up @@ -98,5 +99,5 @@ LABEL org.label-schema.schema-version="1.0" \
org.label-schema.build-date="$BUILD_DATE"

# CMD to run
ENTRYPOINT ["tini", "--", "./opensearch-dashboards-docker-entrypoint.sh"]
ENTRYPOINT ["/bin/tini", "--", "./opensearch-dashboards-docker-entrypoint.sh"]
CMD ["opensearch-dashboards"]
7 changes: 4 additions & 3 deletions docker/release/dockerfiles/opensearch.al2.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ RUN ls -l $TEMP_DIR && \
# Copy working directory to the actual release docker images
FROM amazonlinux:2

ARG TARGETARCH
ARG UID=1000
ARG GID=1000
ARG OPENSEARCH_HOME=/usr/share/opensearch
Expand All @@ -62,8 +63,8 @@ ENV TINI_VERSION=v0.19.0
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
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${TARGETARCH} /bin/tini
RUN chmod 755 /bin/tini

# Create an opensearch user, group
RUN groupadd -g $GID opensearch && \
Expand Down Expand Up @@ -112,5 +113,5 @@ LABEL org.label-schema.schema-version="1.0" \
org.label-schema.build-date="$BUILD_DATE"

# CMD to run
ENTRYPOINT ["tini", "--", "./opensearch-docker-entrypoint.sh"]
ENTRYPOINT ["/bin/tini", "--", "./opensearch-docker-entrypoint.sh"]
CMD ["opensearch"]

0 comments on commit 6d36279

Please sign in to comment.