Skip to content
Permalink
Browse files
Closes #24
Update docker instructions to mount the docker socket

This is because apache/brooklyn-dist#118 now build docker, therefore the container needs to be able to access the docker engine on the host
  • Loading branch information
Duncan Grant committed Nov 12, 2018
2 parents 7f421bb + e09ef2b commit 7eec5c7bee07d94d37f79aadbdfe2a4466df7827
Showing 1 changed file with 3 additions and 1 deletion.
@@ -25,7 +25,7 @@ get this project and its sub-modules:

And then, with jdk 1.8+ and maven 3.1+ installed:

mvn clean install -Dno-go-client -Dno-rpm -Dno-deb
mvn clean install -Dno-go-client -Dno-rpm -Dno-deb -DskipDocker

However, you won't be able to build the RPM/DEB packages, as well as the CLI. That's why we would recommand to use the
alternative: a docker container to build this project:
@@ -34,13 +34,15 @@ alternative: a docker container to build this project:
docker build -t brooklyn .
docker run -i --rm --name brooklyn -u $(id -u):$(id -g) \
--mount type=bind,source="${HOME}/.m2/settings.xml",target=/var/maven/.m2/settings.xml,readonly \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ${PWD}:/usr/build -w /usr/build \
brooklyn mvn clean install -Duser.home=/var/maven -Duser.name=$(id -un)
```

You can speed this up by using your local .m2 cache:
```bash
docker run -i --rm --name brooklyn -u $(id -u):$(id -g) \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ${HOME}/.m2:/var/maven/.m2 \
-v ${PWD}:/usr/build -w /usr/build \
brooklyn mvn clean install -Duser.home=/var/maven -Duser.name=$(id -un)

0 comments on commit 7eec5c7

Please sign in to comment.