Configure Podman To Work With Artifactory

JFrog Artifactory Documentation

ft:sourceType
Paligo

Podman (the Pod Manager) is a tool for managing, developing, and running OCI images on Linux systems. It is daemonless, which makes it more accessible and less vulnerable to security breaches than other clients.

You can configure Podman using two methods: using the podman login command, or manually updating your ~/.docker/config.json file.

To configure Podman clients to work with Artifactory using the podman login command:

  1. Login using the following Podman command:

    Note

    Make sure to replace the placeholder in bold with your own JFrog host domain.

    podman login <YOUR_JFROG_DOMAIN>

    For example:

    podman login my-awesome.jfrog.io
  2. (Optional) Provide your Artifactory username and password or API key. If anonymous access is enabled, you do not need to log in.

To manually set your credentials, copy the following snippet to your ~/.docker/config.json file.

Note

Make sure to replace the placeholders in bold with your own JFrog host domain, token, and email address.

{
	"auths": {
		"<YOUR_JFROG_DOMAIN>" : {
			"auth": "<Token>",
			"email": "<Email>"
		}
	}
}

For example:

{
	"auths": {
		"jfrog.org/artifactory" : {
			"auth": "RANDOM_TOKEN_YWRtaW46QVBBVWJjTExkZTU4WT",
			"email": "johnfrog@email.com"
		}
	}
}
Push OCI Resources Using Podman

To push Podman images using Artifactory:

  1. Tag your image using the following Podman command:

    Note

    Make sure to replace the placeholders in bold with your own JFrog host domain, desired repository path, image, and tag.

    podman tag "<IMAGE_ID>" <YOUR_JFROG_DOMAIN>/<REPOSITORY>/<IMAGE>:<TAG> 

    For example:

    podman tag “5ed3drf04b2be” my-awesome.jfrog.io/myproject-oci-remote/myociimage:latest
  2. Push your image tag using the following Podman command:

    Note

    Make sure to replace the placeholders in bold with your own JFrog host domain, desired repository path, image, and tag.

    Note

    Force-set the image as OCI using the flag -f=oci

    podman push <YOUR_JFROG_DOMAIN>/<REPOSITORY>/<IMAGE>:<TAG> -f=oci

    For example:

    podman push my-awesome.jfrog.io/myproject-oci-remote/myociimage:latest -f=oci
Pull OCI Resources Using Podman

To pull Podman images using Artifactory, use the following Podman command:

Note

Make sure to replace the placeholders in bold with your own JFrog host domain, desired repository path, image, and tag.

podman pull <YOUR_JFROG_DOMAIN>/<REPOSITORY>/<IMAGE>:<TAG> 

For example:

podman pull my-awesome.jfrog.io/myproject-oci-remote/myociimage:latest