Skip to content

Instantly share code, notes, and snippets.

@ingydotnet
Created January 13, 2016 19:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ingydotnet/ab93ade7926474c204d8 to your computer and use it in GitHub Desktop.
Save ingydotnet/ab93ade7926474c204d8 to your computer and use it in GitHub Desktop.
Committing Docker containers
  • Start a fresh Ubuntu container: docker run -it ubuntu bash
  • Inside the container:
    • apt-get update
    • apt-get install figlet
    • Detach from container: <ctl-p> <ctl-q>
  • Get the container id: docker ps
  • Save the container as an image: docker commit $container_id my-image
  • Test the new image: docker run my-image figlet hello
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment