-->
  • Recent Articles

    How to migrate from docker containers to podman

    migration
    migration

     Podman is a daemonless, open source, Linux-native tool designed to develop, manage, and run Open Container Initiative (OCI) containers and pods.  One of Podman's greatest advantages is its complete CLI compatibility with Docker. In fact, when building Podman, Docker users can adapt without any significant changes. 

    Migrating from Docker to Podman

    Firstly , you need to note few things before migration. There no On the fly approach to migrate a container from docker to Podman. So lets start the Process.

    Step 1: Commit your Container. 
    It can be useful to commit a container's file changes or settings into a new image. 

    [root@podman root]#docker commit <container ID> <Imagename:tag>
    Step 2: Save the commited images

    [root@podman root]#docker save <Imagename:tag> | gzip > imagename.tar.gz
    Step 3: Now copy these Images to the destination podman server.

    Step 4: Now Load the image to podman

    [root@podman root]#podman load < imagename.tar.gz
    [root@podman root]#podman load < ubuntu-app-v13.tar.gz
    Getting image source signatures
    Copying blob 78707332102f done
    Copying blob c8bcc222dac8 done
    Copying blob 3d17f02bbe85 done
    Copying blob 7198c7129694 done
    Copying blob 1bd3740e6519 done
    Copying blob cf9d6e35639f done
    Copying blob ae56b39ad7e4 done
    Copying blob ad90256db428 done
    Copying blob cd90f9cb3487 done
    Copying blob 675857bb99a7 done
    Copying blob e4de431a07b3 done
    Copying blob e9852f2fae0b done
    Copying blob 57822e0dd874 done
    Copying blob 9251e567f20c done
    Copying blob 792eefeae011 done
    Copying blob 1cd298964462 done
    Copying blob 86c0e2d879a1 done
    Copying blob 77de69bbbb44 done
    Copying blob 0c01b8400b24 done
    Copying blob 0c87e15af954 done
    Copying blob ee371b8780c8 done
    Copying blob bbf4a5153453 done
    Copying blob 5b24f4d8b6e4 done
    Copying blob b7c5d4b37f74 done
    Copying config 164761da90 done
    Writing manifest to image destination
    Storing signatures
    Loaded image(s): docker.io/library/ubuntu-app-v13:latest
    [root@podman root]#
    Step 5: Verify that Image has been uploaded to Podman.

    [root@podman root]#podman images
    REPOSITORY                                               TAG           IMAGE ID       CREATED          SIZE
    docker.io/library/ubuntu-app-v13             latest        c64c20ff4461   4 hours ago      3.35 GB
    Step 6:  Now run your Container in podman server.

    [root@podman root]#podman run -d ubuntu-app-v13 bash



    No comments