Docker Registry Setup For Cloud Providers
Using the Docker plugin FlexDeploy - Docker Plugin Guide we can perform different operations, one of the important operation is pushing the image to different Docker registries dockerPushImage . Docker plugin support to push docker images to Docker Hub, Microsoft Azure Container Registry, Google Cloud Container Registry, Google Cloud Artifact Registry, AWS Public Container Registry, AWS Private Container Registry and OCI Container Registry.
Docker Hub
To push images on Docker Hub Registry, In the properties section put-
Details | Description |
---|---|
Docker Registry Address | docker.io/dockerpocjava |
Docker Registry User | Username of Docker Hub Account |
Docker Registry User Token/Password | Create the credential with the password of the Docker Hub Account as Secret Text |
Refer to the link: Create Docker Hub Account.
Example:
Microsoft Azure Container Registry
To push images on Microsoft Azure Container Registry, In the properties section put-
Details | Description |
---|---|
Docker Registry Address | acr0510.azurecr.io (The registry address needs to be updated with the ACR address) |
Docker Registry User | Username of Service Principal (Should have push image permission to the registry) |
Docker Registry User Token/Password | Create the credential with the client secret of Service Principal as Secret Text |
n.b. The Service Principal must have permission to push images to the Azure Container Registry.
Refer to the link: More information configuring Azure Container Registry credentials with relevant permissions
Example:
Google Cloud Container Registry
To push images on Google Cloud Container Registry, In the properties section put-
Details | Description |
---|---|
Docker Registry Address | gcr.io/local-index-366116 (The registry address needs to be updated with GCR address *multi-regions are supported.) |
Docker Registry User | Use "oauth2accesstoken" to push images against the GCP Container Registry |
Docker Registry User Token/Password | Create a Service Account and create a key against it. Update the entire Key content as secret text here. |
n.b. The Service Account must have permission to push images to the Google Container Registry. E.g. The account should at least have all permission of Storage Legacy Bucket Writer
Refer to the link: Configure Service Account with key setup
Key File Format:
Example:
HOSTNAMEÂ is the location where the image is stored:
gcr.io currently hosts the images in the United States, but the location may change in the future
us.gcr.io hosts the image in the United States, in a separate storage bucket from images hosted by gcr.io
eu.gcr.io hosts the images within member states of the European Union
asia.gcr.io hosts the images in Asia
Refer to the link: Different Hostnames are supported:
Google Cloud Artifact Registry
To push images on Google Cloud Artifact Registry, In the properties section put-
Details | Description |
---|---|
Docker Registry Address | northamerica-northeast1-docker.pkg.dev/local-index-366116 (The registry address needs to be updated with GC Artifact Registry address. *Different regions are supported.) |
Docker Registry User | Use "oauth2accesstoken" to push images against the GCP Artifact Registry. |
Docker Registry User Token/Password | Create a Service Account and create a key against it. Update the entire Key content as secret text here. |
n.b. The Service Account must have permission to push images to the Google Container Registry. E.g. The account should at least have all permission of the Artifact Registry Writer
Refer to the link: Configure Service Account with key setup
Key File Format:
Example:
Refer to the link: Different regions are supported:
Region is a specific geographic place, such as Tokyo or Northern Virginia.
Multi-region is a large geographic area, such as Asia or the United States, that contains two or more geographic places.
AWS Public Container Registry
To push images on AWS Public Container Registry, In the properties section put-
Details | Description |
---|---|
Docker Registry Address | public.ecr.aws/j5l3c3d4 (The registry address needs to be updated with AWS public container registry address.) |
Docker Registry User | Access Key ID of IAM user (Should have push image permission to the registry.) |
Docker Registry User Token/Password | Create the credential with the Secret Access Key of the IAM user as Secret Text |
n.b. The IAM user must have permission to push images to the AWS public Container Registry. E.g. The account should at least have the permission of AmazonElasticContainerRegistryPublicPowerUser.
n.b. AWS Region should be present as an env variable (E.g. AWS_REGION=us-east-1) for Public AWS Container Registry. Supported AWS Region as of now is : us-east-1 region.
Refer to the link: More information about getting the access key ID and secret access key.
Example:
AWS Private Container Registry
To push images on AWS Private Container Registry, In the properties section put-
Details | Description |
---|---|
Docker Registry Address | 538415813603.dkr.ecr.us-east-1.amazonaws.com (The registry address needs to be updated with AWS private container registry address. *Different regions are supported.) |
Docker Registry User | Access Key ID of IAM user (Should have push image permission to the registry.) |
Docker Registry User Token/Password | Create the credential with the Secret Access Key of the IAM user as Secret Text |
n.b. The IAM user must have permission to push images to the AWS private Container Registry. E.g. The account should at least have permission of AmazonEC2ContainerRegistryPowerUser.
Refer to the link: More information about getting the access key ID and secret access key.
Example:
Refer to the link: Different regions are supported
OCI Container Registry
Docker plugin operation dockerPushImage support pushing image to OCI Container registry, to create a container registry please refer to the link Creating a Container Registry .
To push images on OCI Container Registry, In the properties section put -
Details | Description |
---|---|
OCI Registry Address |
(The registry address needs to be updated with OCI container registry address. ) |
OCI Registry User | The user name will be e.g.
|
OCI Registry User Token/Password | Create the credential with the OCI Auth Token as Secret Text. Please refer to the link to create the Auth Token OCI Creating an Auth Token . |
Creating an Auth Token
log in to the Oracle Cloud Infrastructure Console for your tenancy to create an auth token.
Click Profile on the top right corner of the page.
Click User Settings, select Auth Tokens, and then click Generate Token.
Enter a Description. For example: Container_token.
Click Generate Token.
Copy the generated token in a safe location because it will not be shown again.
Configuration of OCI Container registry using above details.
Please refer to the link for more details about Using an OCI Container Registry .
Â
- style