Importing multiple container images with podman bundled into the same archive fails with 'Error determining manifest MIME type'

Solution Verified - Updated -

Issue

Importing multiple container images with podman bundled into the same archive fails with 'Error determining manifest MIME type'

Install docker from the docker-ce.repo:

# yum config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
# yum install docker-ce -y
# systemctl enable --now docker

Note: Installing and using 3rd party repositories is not supported.

Pull various images:

# docker pull alpine
# docker pull alpine/socat
# docker pull alpine/git

Save the alpine image into a tar archive:

# docker save alpine > alpine.tar
# tar -tf alpine.tar 
6709f754bd0ccbbea9a7481e92772a494cca1543b3421978edff62bc5de16662/
6709f754bd0ccbbea9a7481e92772a494cca1543b3421978edff62bc5de16662/VERSION
6709f754bd0ccbbea9a7481e92772a494cca1543b3421978edff62bc5de16662/json
6709f754bd0ccbbea9a7481e92772a494cca1543b3421978edff62bc5de16662/layer.tar
d6e46aa2470df1d32034c6707c8041158b652f38d2a9ae3d7ad7e7532d22ebe0.json
manifest.json
repositories

Save the other 2 alpine images into a single tar archive:

# docker save alpine/git alpine/socat > alpines.tar
# tar -tf alpines.tar
34ffd0a66ab42fc4e7df94feb76cf4a1a24e7bf0d5ec3c248447e2a2261be60a/
34ffd0a66ab42fc4e7df94feb76cf4a1a24e7bf0d5ec3c248447e2a2261be60a/VERSION
34ffd0a66ab42fc4e7df94feb76cf4a1a24e7bf0d5ec3c248447e2a2261be60a/json
34ffd0a66ab42fc4e7df94feb76cf4a1a24e7bf0d5ec3c248447e2a2261be60a/layer.tar
41c04c1ad3a4c864544b6eba886953cfef99c2d9258d8d8710cd23fe58d63a1d/
41c04c1ad3a4c864544b6eba886953cfef99c2d9258d8d8710cd23fe58d63a1d/VERSION
41c04c1ad3a4c864544b6eba886953cfef99c2d9258d8d8710cd23fe58d63a1d/json
41c04c1ad3a4c864544b6eba886953cfef99c2d9258d8d8710cd23fe58d63a1d/layer.tar
5d7d6ca82beb0f029a15ec4013e4d2c8a0ae9ecae2f11eb763e54945b8b7ab7c.json
a8b6c5c0eb622fe4252b425dce65ac9117ddd45103116b6ca05fe6196bfa97b8.json
bb0bde00bb31ec54766f0755b22e46e356eff25f81696b2102dcfff80ee27a2c/
bb0bde00bb31ec54766f0755b22e46e356eff25f81696b2102dcfff80ee27a2c/VERSION
bb0bde00bb31ec54766f0755b22e46e356eff25f81696b2102dcfff80ee27a2c/json
bb0bde00bb31ec54766f0755b22e46e356eff25f81696b2102dcfff80ee27a2c/layer.tar
bde6811158187d1a499ef57c5c3f5de5e246c1b926ade7c1389131085e1c3986/
bde6811158187d1a499ef57c5c3f5de5e246c1b926ade7c1389131085e1c3986/VERSION
bde6811158187d1a499ef57c5c3f5de5e246c1b926ade7c1389131085e1c3986/json
bde6811158187d1a499ef57c5c3f5de5e246c1b926ade7c1389131085e1c3986/layer.tar
f8968968e46a9aa54fe067c4066a67a51c62026f7ca956e6fd911cfb0ef31a76/
f8968968e46a9aa54fe067c4066a67a51c62026f7ca956e6fd911cfb0ef31a76/VERSION
f8968968e46a9aa54fe067c4066a67a51c62026f7ca956e6fd911cfb0ef31a76/json
f8968968e46a9aa54fe067c4066a67a51c62026f7ca956e6fd911cfb0ef31a76/layer.tar
manifest.json
repositories

Remove docker and dependencies as containerd will conflict with runc:

yum remove docker-ce -y
rm -f /etc/yum.repos.d/docker-ce.repo

Install podman:

yum install podman -y

The following works:

# podman load < alpine.tar        # or podman load -i alpine.tar
Getting image source signatures
Copying blob ace0eda3e3be done  
Copying config d6e46aa247 done  
Writing manifest to image destination
Storing signatures
Loaded image(s): localhost/alpine:latest
[root@nfs-client ~]# podman images
REPOSITORY        TAG     IMAGE ID      CREATED      SIZE
localhost/alpine  latest  d6e46aa2470d  3 weeks ago  5.85 MB

The following does not work:

# podman load < alpines.tar      # or podman load -i alpines.tar
  Unexpected tar manifest.json: expected 1 item, got 2
  open /var/tmp/podman838619494/manifest.json: not a directory
Error: error pulling "": unable to pull dir:/var/tmp/podman838619494: Error determining manifest MIME type for dir:/var/tmp/podman838619494: open /var/tmp/podman838619494/manifest.json: not a directory

Environment

Red Hat Enterprise Linux 8.0
Red Hat Enterprise Linux 8.1
Red Hat Enterprise Linux 8.2
Red Hat Enterprise Linux 8.3

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content