Skip to content

Instantly share code, notes, and snippets.

@pochi
Created June 24, 2017 07:53
Show Gist options
  • Save pochi/a2b6bca9366bdaba830738bf83375c2e to your computer and use it in GitHub Desktop.
Save pochi/a2b6bca9366bdaba830738bf83375c2e to your computer and use it in GitHub Desktop.
docker

save the container

  • Dockerの状態を確認
$ docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
53b8f10c0a88        aws:tensorflow      "/bin/bash"         2 hours ago         Up 2 hours                              sharp_goldberg
  • 対象コンテナを止める
$ docker stop 53b8f10c0a88
53b8f10c0a88
$ docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                        PORTS               NAMES
53b8f10c0a88        aws:tensorflow      "/bin/bash"         2 hours ago         Exited (137) 50 seconds ago                       sharp_goldberg
  • この状態を保存する
$ docker commit 53b8f10c0a88 pochi:tensorflow
  • containerの削除
$ docker commit rm 53b8f10c0a88
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment