Skip to content

Commit

Permalink
Add Docker build type (#39378)
Browse files Browse the repository at this point in the history
This commit adds a new build type (together with deb/rpm/tar/zip) to
represent the official Docker images. This build type will be displayed
in APIs such as the main and nodes info APIs.
  • Loading branch information
jasontedor committed Mar 6, 2019
1 parent 154b650 commit 290c877
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions distribution/docker/src/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ WORKDIR /usr/share/elasticsearch
${source_elasticsearch}

RUN tar zxf /opt/${elasticsearch} --strip-components=1
RUN grep ES_DISTRIBUTION_TYPE=tar /usr/share/elasticsearch/bin/elasticsearch-env \
&& sed -ie 's/ES_DISTRIBUTION_TYPE=tar/ES_DISTRIBUTION_TYPE=docker/' /usr/share/elasticsearch/bin/elasticsearch-env
RUN mkdir -p config data logs
RUN chmod 0775 config data logs
COPY config/elasticsearch.yml config/log4j2.properties config/
Expand Down
3 changes: 3 additions & 0 deletions server/src/main/java/org/elasticsearch/Build.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public static Flavor fromDisplayName(final String displayName) {
public enum Type {

DEB("deb"),
DOCKER("docker"),
RPM("rpm"),
TAR("tar"),
ZIP("zip"),
Expand All @@ -94,6 +95,8 @@ public static Type fromDisplayName(final String displayName) {
switch (displayName) {
case "deb":
return Type.DEB;
case "docker":
return Type.DOCKER;
case "rpm":
return Type.RPM;
case "tar":
Expand Down

0 comments on commit 290c877

Please sign in to comment.