diff --git a/distribution/docker/build.gradle b/distribution/docker/build.gradle index 4492be02d7c..03556edb7c5 100644 --- a/distribution/docker/build.gradle +++ b/distribution/docker/build.gradle @@ -23,7 +23,7 @@ ext.expansions = { oss -> return [ 'elasticsearch' : elasticsearch, 'license' : oss ? 'Apache-2.0' : 'Elastic License', - 'source_elasticsearch': local() ? "COPY $elasticsearch /opt/" : "RUN curl --retry 8 -s -L -O https://artifacts.elastic.co/downloads/elasticsearch/${elasticsearch}", + 'source_elasticsearch': local() ? "COPY $elasticsearch /opt/" : "RUN cd /opt && curl --retry 8 -s -L -O https://artifacts.elastic.co/downloads/elasticsearch/${elasticsearch} && cd -", 'version' : VersionProperties.elasticsearch ] }