corda/docker
2024-09-25 10:06:18 +01:00
..
src Merge branch 'release/os/4.12' into merge-release/os/4.11-release/os/4.12-2024-09-24-389 2024-09-25 10:06:18 +01:00
build.gradle ENT-11065: Remove the need for JVM flags in client code () 2024-01-03 11:22:03 +00:00
README.md NOTICK: Update Docker ReadMe.md () 2022-05-26 09:35:27 +01:00
test-docker.sh fix some typos 2024-03-06 11:06:13 +08:00

Building docker images

There are 3 Gradle tasks dedicated to this:

  • buildDockerFolder will simply create the build folder with all the dockerfiles and the required artifacts (like the corda.jar, config-exporter.jar). This is an internal task and doesn't need to be explicitly invoked.
  • buildDockerImage will build a docker image a publish it in the local docker cache
  • pushDockerImage will build a docker image and push it to a remote docker registry. It is possible to override the docker registry URL for all images using the --registry-url command-line parameter, otherwise each image will be pushed to its own preconfigured docker registry as specified in the net.corda.build.docker.DockerImage.destination field. The latter field is currently left as null for all image variants, which means they are pushed to docker hub.

All 3 tasks use the command-line parameter --image to specify which image variant will be built (it can be used multiple times to build multiple images). To get a list of all supported variants simply launch with a random string:

gradlew docker:buildDockerImage --image NON_EXISTENT_IMAGE_VARIANT

results in

> Cannot convert string value 'NON_EXISTENT_IMAGE_VARIANT' to an enum value of type 'ImageVariant' (valid case insensitive values: UBUNTU_ZULU, UBUNTU_ZULU_11, AL_CORRETTO, OFFICIAL)

If no image variant is specified, all available image variants will be built.

The default repository for all images is corda/corda and you will need official R3 credentials for Artifactory to push there. R3's Artifactory administrators can assist with this if needed, otherwise you can override the repository name using the docker.image.repository Gradle property.

e.g.

gradlew docker:pushDockerImage -Pdocker.image.repository=MyOwnRepository/test --image OFFICIAL --registry-url registry.hub.docker.com