Skip to content

Instantly share code, notes, and snippets.

@coldorb0
Forked from nacyot/tutorial00.md
Created March 22, 2022 05:10
Show Gist options
  • Select an option

  • Save coldorb0/162ea1a2a1f2415a95863ed90b126d7e to your computer and use it in GitHub Desktop.

Select an option

Save coldorb0/162ea1a2a1f2415a95863ed90b126d7e 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