This repository was archived by the owner on Aug 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.5.6
More file actions
53 lines (41 loc) · 1.97 KB
/
Dockerfile.5.6
File metadata and controls
53 lines (41 loc) · 1.97 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM openjdk:11.0.5
## Based on: elasticsearch:5.6.16 (aka: "5.6" on Jan 9th 2020)
## sha256:752be83a53965522fd6914fb518cff9fa3b08ced2bac6e9d89a4b9971bc80b62
ENV GOSU_VERSION=1.10
ENV ELASTICSEARCH_VERSION=5.6.16
ENV ELASTICSEARCH_DEB_VERSION=5.6.16
RUN set -x && \
apt-get update && \
apt-get install -y --no-install-recommends \
apt-transport-https \
bzip2 \
dirmngr \
gnupg \
gosu \
unzip \
xz-utils \
&& \
echo 'deb https://artifacts.elastic.co/packages/5.x/apt stable main' > /etc/apt/sources.list.d/elasticsearch.list && \
rm -rf /var/lib/apt/lists/*
RUN set -x && \
wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" && \
chmod +x /usr/local/bin/gosu && \
gosu nobody true
RUN set -x && \
wget -q https://artifacts.elastic.co/GPG-KEY-elasticsearch -O /a.key && \
apt-key add /a.key && \
rm /a.key
#RUN set -ex; key='46095ACC8548582C1A2699A9D27D666CD88E42B4'; export GNUPGHOME="$(mktemp -d)"; gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; gpg --batch --export "$key" > /etc/apt/trusted.gpg.d/elastic.gpg; rm -rf "$GNUPGHOME"; apt-key list
RUN set -x && \
dpkg-divert --rename /usr/lib/sysctl.d/elasticsearch.conf && \
apt-get update && \
apt-get install -yq --no-install-recommends elasticsearch=5.6.16 && \
rm -rf /var/lib/apt/lists/*
WORKDIR /usr/share/elasticsearch
VOLUME /usr/share/elasticsearch/data
RUN set -ex && for path in ./data ./logs ./config ./config/scripts ; do mkdir -p "$path"; chown -R elasticsearch:elasticsearch "$path"; done
COPY 5.6/elasticsearch.yml 5.6/log4j2.properties /usr/share/elasticsearch/config/
COPY 5.6/docker-entrypoint.sh /
ENV PATH=/usr/share/elasticsearch/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
CMD [ "elasticsearch" ]
ENTRYPOINT [ "/docker-entrypoint.sh" ]