Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # First get ID of running container
- $ docker ps
- CONTAINER ID ...
- 5776d1849024 ...
- # Next we take a snapshot of the docker container by first pausing (-p) the container
- $ docker commit -p 5776d1849024 mysql
- e09f9ac65c8b3...
- # The commit arg saves the entire snapshot as a docker image with a name mysql:
- $ docker images
- REPOSITORY TAG IMAGE ID ...
- mysql latest 5776d1849024 ...
- # To save to a docker repo:
- $ docker login
- $ docker push mysql
- # To save as tarball:
- $ docker save -o mysql.tar mysql
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement