ARTIFACTORY: Configure Podman to work with insecure Artifactory

ARTIFACTORY: Configure Podman to work with insecure Artifactory

AuthorFullName__c
Jian Sun
articleNumber
000006227
ft:sourceType
Salesforce
FirstPublishedDate
2024-11-07T12:46:57Z
lastModifiedDate
2024-11-07
VersionNumber
4
Introduction 

Podman, a daemonless tool for managing OCI images on Linux, is known for its security and flexibility. However, when pushing images to registries like Artifactory, you may encounter TLS errors.

Issue Example
$ podman push myjfrog.com/docker-local/nginx:v1
Error: remote error: tls: unrecognized name

Root cause
This error occurs because Artifactory is set as an insecure registry, while Podman enforces TLS verification by default.

Solutions

Option 1: Skip TLS Verification
Use the --tls-verify=false option during login and push commands to bypass TLS verification:
$ podman login myjfrog.com --tls-verify=false
$ podman push myjfrog.com/docker-local/nginx:v1 --tls-verify=false


Option 2: Configure Artifactory as an Insecure Registry in System File

1. Open the system-wide registries.conf file, usually located at /etc/containers/registries.conf.
2. Add your registry configuration and mark it as insecure:
$ vim /etc/containers/registries.conf
…
[[registry]]
location = "myjfrog.com"
insecure = true

3. Save the file and restart Podman.
 

Verify the Configuration - Pulling Images

Once configured, you should be able to pull images without TLS errors:
$ podman pull myjfrog.com/docker-remote/nginx
Trying to pull myjfrog.com/docker-remote/nginx:latest...
Getting image source signatures
Copying blob sha256:8db4caa19df89c606d39076b27fe163e1f37516f889ff5bfee1fce03056bb6b0
Copying blob sha256:15a97cf85bb88997d139f86b2be23f99175d51d7e45a4c4b04ec0cbdbb56a63b
Copying blob sha256:9e3ea8720c6de96cc9ad544dddc695a3ab73f5581c5d954e0504cc4f80fb5e5c
Copying blob sha256:bf36b64666794f28ea5c3d4d75add149c04e849342e3d45ca31aac9cf4715dd1
Copying blob sha256:9c2d6be5a61d1ad44be8e5e93a5800572cff95601147c45eaa9ecf0d4cb66f83
Copying blob sha256:6b7e4a5c7c7ad54c76bc4861f476f3b70978beede9e752015202dd223383602b
Copying config sha256:448a08f1d2f94e8db6db9286fd77a3a4f3712786583720a12f1648abb8cace25
Writing manifest to image destination
448a08f1d2f94e8db6db9286fd77a3a4f3712786583720a12f1648abb8cace25