himanshug commented on issue #10574:
URL: https://github.com/apache/druid/issues/10574#issuecomment-730061642
I think Dockerfile is written in a way so as to not assume pre-built jars or
maven on the host machine .. which works well for build environments specially.
for dev, as a workaround, you can easily change it e.g. I have following
diff on my Dockerfile so as to not build Druid inside the Docker image ...
```
diff --git a/distribution/docker/Dockerfile b/distribution/docker/Dockerfile
index f036cc07a4..ebb3e33db8 100644
--- a/distribution/docker/Dockerfile
+++ b/distribution/docker/Dockerfile
@@ -25,15 +25,13 @@ RUN export DEBIAN_FRONTEND=noninteractive \
COPY . /src
WORKDIR /src
-RUN mvn -B -ff -q dependency:go-offline \
- install \
- -Pdist,bundle-contrib-exts \
- -Pskip-static-checks,skip-tests \
- -Dmaven.javadoc.skip=true
-
-RUN VERSION=$(mvn -B -q
org.apache.maven.plugins:maven-help-plugin:3.1.1:evaluate \
- -Dexpression=project.version -DforceStdout=true \
- ) \
+#RUN mvn -B -ff -q dependency:go-offline \
+# install \
+# -Pdist,bundle-contrib-exts \
+# -Pskip-static-checks,skip-tests \
+# -Dmaven.javadoc.skip=true
+
+RUN VERSION=0.21.0-SNAPSHOT \
&& tar -zxf ./distribution/target/apache-druid-${VERSION}-bin.tar.gz -C
/opt \
&& ln -s /opt/apache-druid-${VERSION} /opt/druid
```
above diff allowed me to first build Druid on my laptop outside of docker by
running...
`path/to/druid>mvn clean install -DskipTests -Pdist`
then running following to build Druid docker image..
`path/to/druid>docker build -f distribution/docker/Dockerfile -t
druidio/druid:test .`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]