Skip to content

Commit e9d0fca

Browse files
committed
1 parent 58ca884 commit e9d0fca

File tree

5 files changed

+85
-0
lines changed

5 files changed

+85
-0
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ language: bash
44
sudo: 9000
55

66
env:
7+
- VERSION=2.0
78
- VERSION=1.7
89
- VERSION=1.6
910
- VERSION=1.5

2.0/Dockerfile

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
FROM java:8-jre
2+
3+
# grab gosu for easy step-down from root
4+
RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4
5+
RUN arch="$(dpkg --print-architecture)" \
6+
&& set -x \
7+
&& curl -o /usr/local/bin/gosu -fSL "https://github.com/tianon/gosu/releases/download/1.3/gosu-$arch" \
8+
&& curl -o /usr/local/bin/gosu.asc -fSL "https://github.com/tianon/gosu/releases/download/1.3/gosu-$arch.asc" \
9+
&& gpg --verify /usr/local/bin/gosu.asc \
10+
&& rm /usr/local/bin/gosu.asc \
11+
&& chmod +x /usr/local/bin/gosu
12+
13+
RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 46095ACC8548582C1A2699A9D27D666CD88E42B4
14+
15+
ENV ELASTICSEARCH_MAJOR 2.0
16+
ENV ELASTICSEARCH_VERSION 2.0.0~beta1
17+
18+
RUN echo "deb http://packages.elasticsearch.org/elasticsearch/$ELASTICSEARCH_MAJOR/debian stable main" > /etc/apt/sources.list.d/elasticsearch.list
19+
20+
RUN set -x \
21+
&& apt-get update \
22+
&& apt-get install -y --no-install-recommends elasticsearch=$ELASTICSEARCH_VERSION \
23+
&& rm -rf /var/lib/apt/lists/*
24+
25+
ENV PATH /usr/share/elasticsearch/bin:$PATH
26+
27+
RUN set -ex \
28+
&& for path in \
29+
/usr/share/elasticsearch/data \
30+
/usr/share/elasticsearch/logs \
31+
/usr/share/elasticsearch/config \
32+
/usr/share/elasticsearch/config/scripts \
33+
; do \
34+
mkdir -p "$path"; \
35+
chown -R elasticsearch:elasticsearch "$path"; \
36+
done
37+
38+
COPY config/logging.yml /usr/share/elasticsearch/config/
39+
40+
VOLUME /usr/share/elasticsearch/data
41+
42+
COPY docker-entrypoint.sh /
43+
44+
ENTRYPOINT ["/docker-entrypoint.sh"]
45+
46+
EXPOSE 9200 9300
47+
48+
CMD ["elasticsearch"]

2.0/config/logging.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# you can override this using by setting a system property, for example -Des.logger.level=DEBUG
2+
es.logger.level: INFO
3+
rootLogger: ${es.logger.level}, console
4+
logger:
5+
# log action execution errors for easier debugging
6+
action: DEBUG
7+
# reduce the logging for aws, too much is logged under the default INFO
8+
com.amazonaws: WARN
9+
10+
appender:
11+
console:
12+
type: console
13+
layout:
14+
type: consolePattern
15+
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

2.0/docker-entrypoint.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Add elasticsearch as command if needed
6+
if [ "${1:0:1}" = '-' ]; then
7+
set -- elasticsearch "$@"
8+
fi
9+
10+
# Drop root privileges if we are running elasticsearch
11+
if [ "$1" = 'elasticsearch' ]; then
12+
# Change the ownership of /usr/share/elasticsearch/data to elasticsearch
13+
chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/data
14+
exec gosu elasticsearch "$@"
15+
fi
16+
17+
# As argument is not related to elasticsearch,
18+
# then assume that user wants to run his own process,
19+
# for example a `bash` shell to explore this image
20+
exec "$@"

generate-stackbrew-library.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ set -e
44
declare -A aliases
55
aliases=(
66
[1.7]='1 latest'
7+
[2.0]='2'
78
)
89

910
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"

0 commit comments

Comments
 (0)