Pushing Docker Images

The build scripts generated for your application include a docker task that packages your services and workers as Docker images. The registry part of the names of these Docker images is defined by the DOCKER_PUSH_REGISTRY variable in the project gradle.properties file.

By default, this variable is defined to a dummy name. As a result, the Docker images build by the build scripts will look as follows.

$ docker images
REPOSITORY                                                         TAG               IMAGE ID        CREATED        SIZE
docker-registry.internal.some-company.com/app/backend-service      0.1.0-SNAPSHOT    f56d43bb8569    2 hours ago    129MB
docker-registry.internal.some-company.com/app/data-service         0.1.0-SNAPSHOT    ee9afc296988    2 hours ago    159MB
docker-registry.internal.some-company.com/app/engine-worker        0.1.0-SNAPSHOT    c019d11a39a7    3 hours ago    97.6MB
docker-registry.internal.some-company.com/app/execution-service    0.1.0-SNAPSHOT    4e6478ffd2c4    3 hours ago    132MB
docker-registry.internal.some-company.com/app/checker-worker       0.1.0-SNAPSHOT    2c9d1a7c610c    3 hours ago    97.6MB
...

If and when you want to push these Docker images to a registry, either a public one such as DockerHub, or a registry that is private to your organization, then you will need to change the value of the DOCKER_PUSH_REGISTRY variable in the project gradle.properties file, and set it to the hostname of the registry you want to push to (and rerun the docker Gradle task). Note that as long as you do not push your images to a Docker registry, you can use any value for DOCKER_PUSH_REGISTRY, as long as it follows the Docker standards for Docker registry names.

As for the pull registry, if your push registry requires authentication, you will have to use the docker login command to manually sign in to them, prior to running the dockerPush Gradle task.