Created
February 22, 2017 00:06
-
-
Save marinhero/632890fffa8e6393c51773219f446ec9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:14.04 | |
ENV DEBIAN_FRONTEND=noninteractive | |
RUN apt-get update | |
RUN apt-get install -y --no-install-recommends software-properties-common && add-apt-repository -y ppa:webupd8team/java && \ | |
apt-get update && \ | |
(echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections) && \ | |
apt-get install --no-install-recommends -y oracle-java8-installer && \ | |
rm -rf /var/cache/oracle-jdk8-installer && \ | |
echo "networkaddress.cache.ttl=60" >> /usr/lib/jvm/java-8-oracle/jre/lib/security/java.security && \ | |
apt-get clean && rm -rf /var/lib/apt/lists/* | |
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle | |
RUN groupadd -g 1000 elasticsearch && useradd elasticsearch -u 1000 -g 1000 | |
RUN apt-get install wget | |
RUN wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.1.2.deb | |
RUN dpkg -i elasticsearch-5.1.2.deb | |
WORKDIR /usr/share/elasticsearch | |
RUN set -ex && for path in data logs config config/scripts; do \ | |
mkdir -p "$path"; \ | |
chown -R elasticsearch:elasticsearch "$path"; \ | |
done | |
COPY log4j2.properties /usr/share/elasticsearch/config/ | |
COPY elasticsearch.yml /usr/share/elasticsearch/config/ | |
USER elasticsearch | |
ENV PATH=$PATH:/usr/share/elasticsearch/bin | |
CMD ["elasticsearch"] | |
EXPOSE 9200 9300 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment