I tried to install a Ubuntu machine using the Docker command
docker run -it --name mymachine ubuntu
In that Ubuntu machine, I have installed the following applications
And then I performed Docker commit operation docker commit mymachine copymachine
. Now if I run this copy image in a new container means it working perfectly. But in my case, I'm trying to save that image file using the "save" command:
docker save copymachine > MachineInfo.tar
And then forwarding this tar file to my another machine and trying to load this image in that Docker using the following command
docker load MachineInfo.tar updatedmachine
If I try to run this image in a container and trying to access the application installed on the previous machine container.
But none of the applications were been showing in the newly created container.
Inlined with @ halfer comment, You need to perform simple export and import. Please perform the following steps.
docker run -it --name mymachine ubuntu /bin/bash
apt update
apt install default-jre
java -version
docker export 4719ab149ee2 > mymachine.tar
docker stop <container_id>
docker images
dokcer image rm <image_id>
C:\Users\ameena>docker import - mymachine < mymachine.tar
docker images
docker run -it --name mymachinefromimage mymachine:latest /bin/bash
java --version
Note: Step 5,6,7,8,9 are validation steps.