Skip to content

Commit 015c922

Browse files
committed
Fix Dockerfile
1 parent 111a35e commit 015c922

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ services:
1010
args:
1111
ES_VERSION: ${ES_VERSION}
1212
PLUGIN_VERSION: ${PLUGIN_VERSION}
13+
PLUGIN_FILENAME: pathhierarchy-aggregation-${PLUGIN_VERSION}.zip
1314
environment:
1415
- discovery.type=single-node
1516
# NO DEBUG

docker/Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
ARG ES_VERSION
2-
ARG PLUGIN_VERSION
2+
ARG PLUGIN_FILENAME
33

44
FROM docker.elastic.co/elasticsearch/elasticsearch:${ES_VERSION} AS elasticsearch-plugin-debug
55

6-
COPY /build/distributions/pathhierarchy-aggregation-${PLUGIN_VERSION}.zip /tmp/pathhierarchy-aggregation-${PLUGIN_VERSION}.zip
7-
RUN ./bin/elasticsearch-plugin install file:/tmp/pathhierarchy-aggregation-${PLUGIN_VERSION}.zip
6+
COPY build/distributions/${PLUGIN_FILENAME} /tmp/${PLUGIN_FILENAME}
7+
8+
# mandatory because docker ARG is scoped to stage (forgotten after the FROM scope above...!)
9+
ARG PLUGIN_FILENAME
10+
# madantory because ARGS cannot be used inside RUN shell
11+
ENV PLUGIN_FILENAME=${PLUGIN_FILENAME}
12+
RUN ./bin/elasticsearch-plugin install --batch file:/tmp/${PLUGIN_FILENAME}

0 commit comments

Comments
 (0)