Prerequisites: Set up a Docker virtual repository and connect your Docker client to Artifactory. For more information, see Create a Docker Repository and Connect your Docker Client to Artifactory.
To test your Docker setup with Artifactory Cloud:
Run the following command to pull the Docker
hello-worldimage:docker pull hello-world
Log in to Artifactory:
docker login [JFrogPlatformURL]Where:
[JFrogPlatformURL]: The URL of your JPD, without the protocol schema
For example:
docker login company.jfrog.ioRun this command to tag the
hello-worldimage:docker tag <IMAGE_ID> [JFrogPlatformURL]/<REPO_NAME>/hello-world:<TAG>Where:
<IMAGE_ID>: The ID of thehello-worldimage[JFrogPlatformURL]: The URL of your JPD, without the protocol schema<REPO_NAME>: The name of the target virtual repository<TAG>: The tag you want to apply to the image
For example:
docker tag a1b2c3d4e5f6 company.jfrog.io/docker-virtual/hello-world:testPush the tagged image:
docker push [JFrogPlatformURL]/<REPO_NAME>/hello-world:<TAG>Where:
[JFrogPlatformURL]: The URL of your JPD, without the protocol schema<REPO_NAME>: The name of the target virtual repository<TAG>: The tag you applied to the image
For example:
docker push company.jfrog.io/docker-virtual/hello-world:testVerify that the
hello-worldimage with your specified tag. appears in your Artifactory repository.