Path: blob/master/buildenv/docker/test/README.md
12460 views
To use this docker file:
Depends on your OS platform, build the base openj9 docker image from the script in buildenv/docker/mkdocker.sh
bash mkdocker.sh --tag=openj9 --dist=ubuntu --version=16 --buildBuild the Docker image from buildenv/docker/test/ for testing
docker build -t=openj9-buildandtest .If your previous openj9 base Docker image is in a different name, use this to build the testing Docker imagedocker build --build-arg IMAGE_NAME=<image_name> --build-arg IMAGE_VERSION=<image_version> -t openj9-buildandtest .Run this Docker image for your scenario
a) Scenario 1: I want to run OpenJ9 tests against a downloaded OpenJ9 binary (OpenJ9 SDK). Or I just want to test my new test code against a pre-built OpenJ9 SDK.
Run this Docker cmd:
docker run -it -v <path_to_openj9_sdk_roots>:/java -v <path_to_openj9_test_dir>:/test openj9-buildandtestb) Scenario 2: I want to build the OpenJ9 and also test it.
Follow both README in these two links
https://github.com/eclipse-openj9/openj9/blob/master/test/README.md
Highly recommend mounting folders to Docker container rather than cloning them within Docker container. e.g.
docker run -it -v <path_to_openj9-openjdk-jdk11_dir>:/openj9-openjdk-jdk11In this case, the built OpenJ9 SDK can be easily ported to localhost machine.