Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. # First get ID of running container
  2. $ docker ps
  3. CONTAINER ID ...
  4. 5776d1849024 ...
  5.  
  6. # Next we take a snapshot of the docker container by first pausing (-p) the container
  7. $ docker commit -p 5776d1849024 mysql
  8. e09f9ac65c8b3...
  9.  
  10. # The commit arg saves the entire snapshot as a docker image with a name mysql:
  11. $ docker images
  12. REPOSITORY TAG IMAGE ID ...
  13. mysql latest 5776d1849024 ...
  14.  
  15. # To save to a docker repo:
  16. $ docker login
  17. $ docker push mysql
  18.  
  19. # To save as tarball:
  20. $ docker save -o mysql.tar mysql
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement