Skip to content

Commit

Permalink
[docker] Prevent JDK9/JDK10 container collision
Browse files Browse the repository at this point in the history
  • Loading branch information
JakubVanek committed Mar 25, 2018
1 parent 7046fad commit 092a5f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ JShell JDI agent on the remote side, which is handled by SSH as well.
2. Adjust the JAVA_VERSION variable in `build/config.sh` to match the current OpenJDK tip: [OpenJDK 9 updates](http://hg.openjdk.java.net/jdk-updates/jdk9u/)
3. Build the jdk9 cross-compilation environment:
```sh
sudo docker build -t ev3dev-lang-java:jdk-stretch -f build/Dockerfile.system build
sudo docker build -t ev3dev-lang-java:jdk-build -f build/Dockerfile.scripts build
sudo docker build -t ev3dev-lang-java:jdk9-stretch -f build/Dockerfile.system build
sudo docker build -t ev3dev-lang-java:jdk9-build -f build/Dockerfile.scripts build
```
4. Run the newly prepared container. You have to mount a host directory to the the `/build` directory in the container,
otherwise the build would get discarded. The final build needs at least 6.5 GB of free space (in the build directory).
```
sudo docker run --rm -it -v <path on host, where the sources should be stored>:/build ev3dev-lang-java:jdk-build
sudo docker run --rm -it -v <path on host, where the sources should be stored>:/build ev3dev-lang-java:jdk9-build
```
5. Let's fetch the OpenJDK sources:
```
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile.scripts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ev3dev-lang-java:jdk-stretch
FROM ev3dev-lang-java:jdk9-stretch

# copy build patches & scripts
COPY *.patch *.sh /opt/jdkcross/
Expand Down

0 comments on commit 092a5f7

Please sign in to comment.