3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Docker Hubに自分の作ったイメージをpushする手順

Posted at

##実行環境

・docker for Mac
・Docker version 19.03.8
・dockerをインストール済である亊
##まずは自分の作ったイメージを確認する

docker image ls
REPOSITORY           TAG                 IMAGE ID            CREATED             SIZE
jun3030              latest              ab382fbe9111        18 hours ago        750MB
first_docker         latest              ab382fbe9111        18 hours ago        750MB
alpine               latest              f70734b6a266        29 hours ago        5.61MB
golang               1.9                 ef89ef5c42a9        21 months ago       750MB
gihyodocker/echo     latest              3dbbae6eb30d        2 years ago         733MB

docker hubにpushしたいリポジトリを探し、そのIMAGE IDをコピーする。ここではjun3030のimageIDを選択。再びコマンドを打つ。

docker tag ab382fbe9111 jun3030/dockerrepo 


*捕捉
jun3030 = dockerアカウント作成時のID
dockerrepo = push先のリポジトリの名前

先程のコマンドの結果を確認

docker image ls
REPOSITORY           TAG                 IMAGE ID            CREATED             SIZE
jun3030              latest              ab382fbe9111        18 hours ago        750MB
jun3030/dockerrepo   latest              ab382fbe9111        18 hours ago        750MB
first_docker         1.1.1               ab382fbe9111        18 hours ago        750MB
alpine               latest              f70734b6a266        29 hours ago        5.61MB
golang               1.9                 ef89ef5c42a9        21 months ago       750MB
gihyodocker/echo     latest              3dbbae6eb30d        2 years ago         733MB

新しく jun3030/dockerrepo latest ab382fbe9111 18 hours ago 750MB と作成されている事を確認。これを使いpushしていきます。

docker image push jun3030/dockerrepo
The push refers to repository [docker.io/jun3030/dockerrepo]
21874c1e017a: Pushed 
b6942a570355: Pushed 
186d94bd2c62: Mounted from library/golang 
24a9d20e5bee: Mounted from library/golang 
e7dc337030ba: Mounted from library/golang 
920961b94eb3: Mounted from library/golang 
fa0c3f992cbd: Mounted from library/golang 
ce6466f43b11: Mounted from library/golang 
719d45669b35: Mounted from library/golang 
3b10514a95be: Mounted from library/golang 
latest: digest: sha256:03faeca1797966567f99038d909acc2364a88b60f97d08791894998c4efe5cdb size: 2418

これで docker hub にpushしたイメージのリポジトリが出来上がっているはずです。

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?