-
Notifications
You must be signed in to change notification settings - Fork 21
/
Dockerfile
36 lines (30 loc) · 1.05 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM docker.elastic.co/elasticsearch/elasticsearch:5.6.3
WORKDIR /
USER root
ENV GOSU_VERSION 1.10
RUN set -ex; \
\
yum -y install epel-release; \
yum -y install wget dpkg; \
\
dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \
wget -O /usr/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \
wget -O /tmp/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \
\
# verify the signature
export GNUPGHOME="$(mktemp -d)"; \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
gpg --batch --verify /tmp/gosu.asc /usr/bin/gosu; \
rm -r "$GNUPGHOME" /tmp/gosu.asc; \
\
chmod +x /usr/bin/gosu; \
# verify that the binary works
gosu nobody true; \
\
yum -y remove wget dpkg; \
yum clean all
# set the JVM TTL.
RUN sed -i 's/#networkaddress.cache.ttl=-1/networkaddress.cache.ttl=10/g' $JAVA_HOME/lib/security/java.security
COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["elasticsearch"]