corda/docker
2024-10-14 13:48:47 +00:00
..
src CORE-11136: release prep for release-os-4.9.11-RC01 2024-10-14 13:48:47 +00:00
build.gradle ENT-6426: update docker tagging inline with our dockerhub policies () 2022-01-19 10:34:35 +00:00
README.md INFRA-803 Rebuild Docker image tasks () 2020-11-20 10:21:53 +00:00
test-docker.sh CORDA-4954 : Improvements to docker image : compatible with v3.3; image size; truststore () 2019-04-25 11:18:25 +01: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. Ross Nicoll (or other 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