Skip to content

Instantly share code, notes, and snippets.

@alien18331
Last active January 1, 2020 08:11
Show Gist options
  • Save alien18331/7c3ac2f4cd001b057015cdc4f6fb661a to your computer and use it in GitHub Desktop.
Save alien18331/7c3ac2f4cd001b057015cdc4f6fb661a to your computer and use it in GitHub Desktop.
commit guide
#run & enter container
> docker run -t -i ubuntu /bin/bash
#commit (not inside the docker)
1. check container id by cmd$ docker ps
2. commit
> sudo docker commit [container ID] [fileName.tar]
#save image
1. check image name by cmd$ docker images -a
2. save image(ubnsc)
> sudo docker save ubnsc > ubnsc.tar
3. check file.tar by cmd$ ls
#for verification (outside the docker)
1. check imageID by cmd$ docker images -a
> sudo docker rmi -f [ImageID]
if error as "image has dependent child images", del the base image first
2. load image from file.tar
> sudo docker load < file.tar
3.check images by cmd$ docker images -a
> sudo docker load < file.tar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment