xBis7 commented on PR #6483:
URL: https://github.com/apache/hadoop/pull/6483#issuecomment-1919710228

   Hi @jojochuang, it's not the same as running `docker build` and building the 
image. It doesn't work unless you use the `-Pdist` option, which is what takes 
the extra time and not docker.
   
   When you run `docker build` in one of the special branches, it downloads the 
release tarball and then extracts it and copies it under the docker containers. 
The containers then use the release files when the docker env is started.
   
   Here, when you enable the `-Pdist`, you get all the files that would 
normally be under a release, under `hadoop-dist/target/hadoop-<version>`. We 
mount the contents of that dir as a docker volume for all the containers. We 
use these files for the docker env just like we would do with the files from a 
release, with the difference that we didn't have to download them or copy them.
   
   For reference, these are the times on my machine for this branch
   
   * Without `-Pdist`
   ```shell
   > mvn clean install -Dmaven.javadoc.skip=true -DskipTests -DskipShade
    ------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time:  02:24 min
   ```
   
   * With `-Pdist`
   ```shell
   > mvn clean install -Dmaven.javadoc.skip=true -DskipTests -DskipShade 
-Pdist,src
   [INFO] BUILD SUCCESS
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time:  06:18 min
   ```
   
   That's how long it takes in master as well.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to