Skip to content

Commit

Permalink
for idaholab#389, use tini for correct arch
Browse files Browse the repository at this point in the history
  • Loading branch information
mmguero committed May 10, 2024
1 parent 1f479ed commit 3758e1b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 16 deletions.
9 changes: 6 additions & 3 deletions Dockerfiles/dashboards.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ ENV PUSER_PRIV_DROP true
ENV TERM xterm

ENV TINI_VERSION v0.19.0
ENV TINI_URL https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini

ENV OSD_TRANSFORM_VIS_VERSION 2.13.0

ARG NODE_OPTIONS="--max_old_space_size=4096"
Expand All @@ -31,10 +33,10 @@ ENV PATH="/data:${PATH}"

USER root

ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini
ADD https://github.com/lguillaud/osd_transform_vis/releases/download/$OSD_TRANSFORM_VIS_VERSION/transformVis-$OSD_TRANSFORM_VIS_VERSION.zip /tmp/transformVis.zip

RUN yum upgrade -y && \
RUN export BINARCH=$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/') && \
yum upgrade -y && \
yum install -y curl-minimal psmisc findutils util-linux openssl rsync python3 zip unzip && \
yum remove -y vim-* && \
usermod -a -G tty ${PUSER} && \
Expand All @@ -49,7 +51,8 @@ RUN yum upgrade -y && \
/usr/share/opensearch-dashboards/bin/opensearch-dashboards-plugin install file:///tmp/transformVis.zip --allow-root && \
rm -rf /tmp/transformVis /tmp/opensearch-dashboards && \
chown --silent -R ${PUSER}:${PGROUP} /usr/share/opensearch-dashboards && \
chmod +x /usr/bin/tini && \
curl -sSLf -o /usr/bin/tini "${TINI_URL}-${BINARCH}" && \
chmod +x /usr/bin/tini && \
yum clean all && \
rm -rf /var/cache/yum

Expand Down
5 changes: 1 addition & 4 deletions Dockerfiles/filebeat.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,9 @@ ENV SUPERCRONIC_VERSION "0.2.29"
ENV SUPERCRONIC_URL "https://github.com/aptible/supercronic/releases/download/v$SUPERCRONIC_VERSION/supercronic-linux-"
ENV SUPERCRONIC_CRONTAB "/etc/crontab"

ENV TINI_VERSION v0.19.0

USER root

ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini

RUN export BINARCH=$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/') && \
apt-get -q update && \
apt-get -y -q --no-install-recommends upgrade && \
Expand All @@ -92,13 +89,13 @@ RUN export BINARCH=$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')
python3-setuptools \
rsync \
tar \
tini \
unar \
unzip \
xz-utils && \
python3 -m pip install --no-compile --no-cache-dir patool entrypoint2 pyunpack python-magic ordered-set supervisor watchdog && \
curl -fsSL -o /usr/local/bin/supercronic "${SUPERCRONIC_URL}${BINARCH}" && \
chmod +x /usr/local/bin/supercronic && \
chmod +x /usr/bin/tini && \
apt-get -y -q --allow-downgrades --allow-remove-essential --allow-change-held-packages autoremove && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
Expand Down
5 changes: 0 additions & 5 deletions Dockerfiles/logstash.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ ENV PUSER_RLIMIT_UNLOCK true
ENV DEBIAN_FRONTEND noninteractive
ENV TERM xterm

ENV TINI_VERSION v0.19.0

ARG LOGSTASH_ENRICHMENT_PIPELINE=enrichment
ARG LOGSTASH_PARSE_PIPELINE_ADDRESSES=zeek-parse,suricata-parse,beats-parse
ARG LOGSTASH_OPENSEARCH_PIPELINE_ADDRESS_INTERNAL=internal-os
Expand All @@ -39,8 +37,6 @@ ENV LOGSTASH_OPENSEARCH_OUTPUT_PIPELINE_ADDRESSES $LOGSTASH_OPENSEARCH_OUTPUT_PI

USER root

ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini

RUN set -x && \
apt-get -q update && \
apt-get -y -q --no-install-recommends upgrade && \
Expand All @@ -53,7 +49,6 @@ RUN set -x && \
python3-requests \
rsync \
tini && \
chmod +x /usr/bin/tini && \
pip3 install ipaddress supervisor manuf pyyaml && \
export JAVA_HOME=/usr/share/logstash/jdk && \
/usr/share/logstash/vendor/jruby/bin/jruby -S gem install bundler && \
Expand Down
9 changes: 5 additions & 4 deletions Dockerfiles/opensearch.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ ENV PUSER_RLIMIT_UNLOCK true
ENV TERM xterm

ENV TINI_VERSION v0.19.0
ENV TINI_URL https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini

ARG DISABLE_INSTALL_DEMO_CONFIG=true
ARG DISABLE_PERFORMANCE_ANALYZER_AGENT_CLI=true
Expand All @@ -34,11 +35,10 @@ ENV OPENSEARCH_JAVA_HOME=/usr/share/opensearch/jdk

USER root

ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini

# Remove the opensearch-security plugin - Malcolm manages authentication and encryption via NGINX reverse proxy
# Remove the performance-analyzer plugin - Reduce resources in docker image
RUN yum upgrade -y && \
RUN export BINARCH=$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/') && \
yum upgrade -y && \
yum install -y openssl util-linux procps rsync findutils && \
yum remove -y vim-* && \
/usr/share/opensearch/bin/opensearch-plugin remove opensearch-security --purge && \
Expand All @@ -55,7 +55,8 @@ RUN yum upgrade -y && \
/opt/opensearch/backup \
/usr/share/opensearch/config/bootstrap \
/usr/share/opensearch/config/persist && \
chmod +x /usr/bin/tini && \
curl -sSLf -o /usr/bin/tini "${TINI_URL}-${BINARCH}" && \
chmod +x /usr/bin/tini && \
sed -i '/^[[:space:]]*runOpensearch.*/i /usr/local/bin/jdk-cacerts-auto-import.sh || true' /usr/share/opensearch/opensearch-docker-entrypoint.sh && \
sed -i '/^[[:space:]]*runOpensearch.*/i /usr/local/bin/keystore-bootstrap.sh || true' /usr/share/opensearch/opensearch-docker-entrypoint.sh

Expand Down

0 comments on commit 3758e1b

Please sign in to comment.