소프트웨어/Docker
[Docker] How to use (Command)
개발자_이훈규
2016. 7. 6. 20:12
reference : http://bluese05.tistory.com/15
$ docker search ubuntu
$ docker pull ubuntu:latest
$ docker run -i -t --name ubuntu_ ubuntu /bin/bash
$ docker start ubuntu_
$ docker restart ubuntu_
$ docker attach ubuntu_
$ sudo docker commit -a "Foo Bar <foo@bar.com>" -m "add hello.txt" hello-nginx hello:0.2
docker commit <옵션> <컨테이너 이름> <이미지 이름>:<태그> 형식
마지막에 <이미지 이름>:<태그>는 저장 될 이미지 이름과 태그이다.
+) wordpress docker와 같은 경우 bash로 접속하고 싶다면,
docker exec -it [container number] bash