mirror of
https://github.com/corda/corda.git
synced 2024-12-22 14:22:28 +00:00
.. | ||
src | ||
build.gradle | ||
README.md | ||
test-docker.sh |
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 thecorda.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 cachepushDockerImage
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 thenet.corda.build.docker.DockerImage.destination
field. The latter field is currently left asnull
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