mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[build] Dockerfile feedback (#217354)
Addresses feedback from https://github.com/docker-library/official-images/pull/18692. https://buildkite.com/elastic/kibana-artifacts-snapshot/builds/6005
This commit is contained in:
parent
8b7a865b52
commit
9b90fa5197
1 changed files with 12 additions and 16 deletions
|
@ -20,9 +20,10 @@ RUN apk --no-cache add curl
|
|||
|
||||
{{#usePublicArtifact}}
|
||||
RUN cd /tmp && \
|
||||
curl --retry 8 -s -L \
|
||||
{{#wolfi}}arch="$(apk --print-arch)" ; \ {{/wolfi}}{{#ubi}}arch="$(rpm --query --queryformat='%{ARCH}' rpm)"; \ {{/ubi}} && \
|
||||
curl -f --retry 8 -s -L \
|
||||
--output kibana.tar.gz \
|
||||
https://{{publicArtifactSubdomain}}.elastic.co/downloads/kibana/{{artifactPrefix}}-$(arch).tar.gz && \
|
||||
https://{{publicArtifactSubdomain}}.elastic.co/downloads/kibana/{{artifactPrefix}}-$arch.tar.gz && \
|
||||
cd -
|
||||
{{/usePublicArtifact}}
|
||||
{{^usePublicArtifact}}
|
||||
|
@ -44,18 +45,19 @@ RUN chmod -R g=u /usr/share/kibana
|
|||
# Add an init process, check the checksum to make sure it's a match
|
||||
RUN set -e ; \
|
||||
TINI_BIN="" ; \
|
||||
case "$(arch)" in \
|
||||
{{#wolfi}}arch="$(apk --print-arch)" ; \ {{/wolfi}}{{#ubi}}arch="$(rpm --query --queryformat='%{ARCH}' rpm)"; \ {{/ubi}}
|
||||
case "$arch" in \
|
||||
aarch64) \
|
||||
TINI_BIN='tini-arm64' ; \
|
||||
;; \
|
||||
x86_64) \
|
||||
TINI_BIN='tini-amd64' ; \
|
||||
;; \
|
||||
*) echo >&2 "Unsupported architecture $(arch)" ; exit 1 ;; \
|
||||
*) echo >&2 "Unsupported architecture $arch" ; exit 1 ;; \
|
||||
esac ; \
|
||||
TINI_VERSION='v0.19.0' ; \
|
||||
curl --retry 8 -S -L -O "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/${TINI_BIN}" ; \
|
||||
curl --retry 8 -S -L -O "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/${TINI_BIN}.sha256sum" ; \
|
||||
curl -f --retry 8 -S -L -O "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/${TINI_BIN}" ; \
|
||||
curl -f --retry 8 -S -L -O "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/${TINI_BIN}.sha256sum" ; \
|
||||
sha256sum -c "${TINI_BIN}.sha256sum" ; \
|
||||
rm "${TINI_BIN}.sha256sum" ; \
|
||||
mv "${TINI_BIN}" /bin/tini ; \
|
||||
|
@ -85,14 +87,9 @@ FROM {{{baseImageName}}}
|
|||
EXPOSE 5601
|
||||
|
||||
{{#ubi}}
|
||||
RUN for iter in {1..10}; do \
|
||||
microdnf update --setopt=tsflags=nodocs -y && \
|
||||
microdnf install --setopt=tsflags=nodocs -y \
|
||||
RUN microdnf install --setopt=tsflags=nodocs -y \
|
||||
fontconfig liberation-fonts-common freetype shadow-utils nss findutils && \
|
||||
microdnf clean all && exit_code=0 && break || exit_code=$? && echo "microdnf error: retry $iter in 10s" && \
|
||||
sleep 10; \
|
||||
done; \
|
||||
(exit $exit_code)
|
||||
microdnf clean all
|
||||
{{/ubi}}
|
||||
{{#wolfi}}
|
||||
RUN apk --no-cache add bash curl fontconfig font-liberation libstdc++ libnss findutils shadow ca-certificates
|
||||
|
@ -115,7 +112,7 @@ RUN ln -s /usr/share/kibana /opt/kibana
|
|||
|
||||
{{! Please notify @elastic/kibana-security if you want to remove or change this environment variable. }}
|
||||
{{! Kibana applications may depend on the ELASTIC_CONTAINER value. Screenshotting uses this to conditionally disable the Chromium sandbox when launching Puppeteer. }}
|
||||
ENV ELASTIC_CONTAINER true
|
||||
ENV ELASTIC_CONTAINER=true
|
||||
ENV PATH=/usr/share/kibana/bin:$PATH
|
||||
|
||||
# Set some Kibana configuration defaults.
|
||||
|
@ -179,8 +176,7 @@ LABEL name="Kibana" \
|
|||
summary="Kibana" \
|
||||
description="Your window into the Elastic Stack."
|
||||
|
||||
RUN mkdir /licenses && \
|
||||
cp LICENSE.txt /licenses/LICENSE
|
||||
RUN mkdir /licenses && ln LICENSE.txt /licenses/LICENSE
|
||||
{{/ubi}}
|
||||
|
||||
ENTRYPOINT ["/bin/tini", "--"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue