Create the Artifactory Registry
Each Artifact Registry repository must have a unique name, and only accounts with the right permissions can create the repositories.
-
Execute the following command to create an Artifact Registry repository:
gcloud artifacts repositories create <REPOSITORY> --location=<LOCATION> --repository-format=<REPOSITORY_FORMAT> --description=<DESCRIPTION>
Where:
<REPOSITORY> the ID or name for the repository
<LOCATION> the location of the repository. Setting the location here will override the default artifacts location value.
<REPOSITORY_FORMAT> format of the repository. The available options are: apt, docker, go, kfp, maven, npm, python or yum. For more information about the formats, see REQUIRED FLAGS.
<DESCRIPTION> is an optional description of the repository
gcloud artifacts repositories create gcp-arcsight-test-artifact-registry \ --repository-format=docker \ --location=us-central1 \ --description="Repository for container images for GCP ArcSight Test"
-
Add the Docker credHelper entry to the Docker configuration file, thus registering Google Cloud as the credential helper for all Google-supported Docker registries. Execute the following command:
gcloud auth configure-docker <[REGISTRIES]>
Where:
<REGISTRIES> is a comma-separated list of repository hostnames to add to the credential helper configuration.
For example, to add the us-central1 and asia-northeast1 regions, run the following command:
gcloud auth configure-docker us-central1-docker.pkg.dev,asia-northeast1-docker.pkg.dev
-
If prompted, select Yes.