Skip to content

Instantly share code, notes, and snippets.

@nacyot
Created January 17, 2018 07:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nacyot/3d193b9ef96b0b96b47f5f5b4585e00a to your computer and use it in GitHub Desktop.
Save nacyot/3d193b9ef96b0b96b47f5f5b4585e00a to your computer and use it in GitHub Desktop.

Docker commit

$ docker run -it ubuntu:16.04 bash
# apt-get update
# apt-get install -y git
# git version
$ docker ps
$ docker diff <CONTAINER_ID>
$ docker commit <CONTAINER_ID> ubunut:git
$ docker run -it ubuntu:git bash
# git

Dockerfile

FROM ubuntu:16.04

RUN apt-get update
RUN apt-get install -y git
$ docker build -t ubuntu:git02 .
$ docker run -it ubuntu:git02 bash
# git version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment