How Can We Help?
Pull Custom Docker Images
Introduction
In Liferay cloud environments, custom Docker images are generated and utilized for most of its services. These images are tailored to meet the specific needs of your application and can be stored using Google Cloud Artifact Registry service.
The purpose of this documentation is to show how to configure a machine with the required tools to have access to these images.
Prerequisites
- Receive from Firelay staff the following information:
- Service account address
- JSON file with service account credentials.
- Project name
- Repository path
- Install gcloud CLI tool.
https://cloud.google.com/sdk/docs/install
Procedure
1. – Authenticate using the service account.
gcloud auth activate-service-account <service account address> --key-file=<path to json file> --project=<project name>
2. – Update the docker configuration to be able to connect to the specific Google Artifact Registry region:
gcloud auth configure-docker <artifact-registry-region>-docker.pkg.dev --quiet
3. – Get the list of available images.
gcloud artifacts docker images list <docker-repo-path> --include-tags --filter="-IMAGE:(*/cache) AND TAGS:(*)"
4. – Copy the path of the chosen image and the tag.
5. – Pull the image using Docker pull or Docker run.
docker pull <image path>:<image tag>