Skip to content

Instantly share code, notes, and snippets.

@koheyamada
Last active March 28, 2016 03:49
Show Gist options
  • Save koheyamada/69de72907630d488170d to your computer and use it in GitHub Desktop.
Save koheyamada/69de72907630d488170d to your computer and use it in GitHub Desktop.
Dockerコンテナのリポジトリ管理 DockerHubへログイン、イメージの取得〜更新、コミットまで。 ref: http://qiita.com/kooohei/items/1e007fe650c6aa7eaac4
$ docker push kohei/httpd:ver1.0
The push refers to a repository [docker.io/kohei/httpd] (len: 1)
02607c25ed22: Pushed
4cf71c080937: Image already exists
e87afdecef01: Image already exists
13bab7291cec: Image already exists
d3bf674be7aa: Image already exists
ver1.0: digest: sha256:fb10c3626b1fc732c314efc132a29f7ee37c52176547a076c72553a97eaee949 size: 9116
$ docker login
Username: kohei
Password:
Email: kohei@hogehoge.jp
WARNING: login credentials saved in /Users/kohei/.docker/config.json
Login Succeeded
$ docker commit -m "edited container" b10edb89cd05 kohei/httpd:ver1.0
02607c25ed22c085a8e4964c91406baa911f194265db5d4ddfd44a2f96e799ec
$ docker pull kohei/httpd:ver1.0
ver1.0: Pulling from kohei/httpd
a2c33fe967de: Pull complete
d3bf674be7aa: Pull complete
13bab7291cec: Pull complete
e87afdecef01: Pull complete
4cf71c080937: Pull complete
Digest: sha256:5b940d5b742317185db6b1d25b06e6e68060b08f8fdd53f36a6bd6d471bd7043
Status: Downloaded newer image for kohei/httpd:ver1.0
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b10edb89cd05 kohei/httpd:ver1.0 "/bin/bash" 43 seconds ago Exited (0) 12 seconds ago gloomy_khorana
$ docker run -it kohei/httpd:ver1.0 /bin/bash
$ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
kohei/httpd ver1.0 02607c25ed22 5 seconds ago 264.3 MB
$ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
kohei/httpd ver1.0 4cf71c080937 2 days ago 264.3 MB
$ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment