Add Docker build type (#39378)

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.
This commit is contained in:
Jason Tedor 2019-03-05 10:15:59 -07:00
parent eb288a6f85
commit 504c792861
No known key found for this signature in database
GPG Key ID: FA89F05560F16BC5
2 changed files with 5 additions and 0 deletions

View File

@ -31,6 +31,8 @@ WORKDIR /usr/share/elasticsearch
COPY ${elasticsearch} /opt/ COPY ${elasticsearch} /opt/
RUN tar zxf /opt/${elasticsearch} --strip-components=1 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 mkdir -p config data logs
RUN chmod 0775 config data logs RUN chmod 0775 config data logs
COPY config/elasticsearch.yml config/log4j2.properties config/ COPY config/elasticsearch.yml config/log4j2.properties config/

View File

@ -75,6 +75,7 @@ public class Build {
public enum Type { public enum Type {
DEB("deb"), DEB("deb"),
DOCKER("docker"),
RPM("rpm"), RPM("rpm"),
TAR("tar"), TAR("tar"),
ZIP("zip"), ZIP("zip"),
@ -94,6 +95,8 @@ public class Build {
switch (displayName) { switch (displayName) {
case "deb": case "deb":
return Type.DEB; return Type.DEB;
case "docker":
return Type.DOCKER;
case "rpm": case "rpm":
return Type.RPM; return Type.RPM;
case "tar": case "tar":