14
14
FROM ${base_image} AS builder
15
15
16
16
RUN for iter in {1..10}; do yum update --setopt=tsflags=nodocs -y && \
17
- yum install --setopt=tsflags=nodocs -y gzip shadow-utils tar && \
17
+ yum install --setopt=tsflags=nodocs -y wget gzip shadow-utils tar && \
18
18
yum clean all && exit_code=0 && break || exit_code=\$ ? && echo "yum error: retry \$ iter in 10s" && sleep 10; done; \
19
19
(exit \$ exit_code)
20
20
21
+ # `tini` is a tiny but valid init for containers. This is used to cleanly
22
+ # control how ES and any child processes are shut down.
23
+ #
24
+ # The tini GitHub page gives instructions for verifying the binary using
25
+ # gpg, but the keyservers are slow to return the key and this can fail the
26
+ # build. Instead, we check the binary against a checksum that they provide.
27
+ RUN wget --no-cookies --quiet https://github.com/krallin/tini/releases/download/v0.19.0/tini-${tini_arch} \
28
+ && wget --no-cookies --quiet https://github.com/krallin/tini/releases/download/v0.19.0/tini-${tini_arch}.sha256sum \
29
+ && sha256sum -c tini-${tini_arch}.sha256sum \
30
+ && mv tini-${tini_arch} /tini \
31
+ && chmod +x /tini
32
+
21
33
ENV PATH /usr/share/elasticsearch/bin:\$ PATH
22
34
23
35
RUN groupadd -g 1000 elasticsearch && \
@@ -35,17 +47,6 @@ RUN chmod 0775 config config/jvm.options.d data logs
35
47
COPY config/elasticsearch.yml config/log4j2.properties config/
36
48
RUN chmod 0660 config/elasticsearch.yml config/log4j2.properties
37
49
38
- # `tini` is a tiny but valid init for containers. This is used to cleanly
39
- # control how ES and any child processes are shut down.
40
- #
41
- # The tini GitHub page gives instructions for verifying the binary using
42
- # gpg, but the keyservers are slow to return the key and this can fail the
43
- # build. Instead, we check the binary against a checksum that we have
44
- # computed.
45
- ADD https://github.com/krallin/tini/releases/download/v0.18.0/tini${tini_suffix} /tini
46
- COPY config/tini${tini_suffix}.sha512 /tini.sha512
47
- RUN sha512sum -c /tini.sha512 && chmod +x /tini
48
-
49
50
# ###############################################################################
50
51
# Build stage 1 (the actual elasticsearch image):
51
52
# Copy elasticsearch from stage 0
0 commit comments