16
12

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 5 years have passed since last update.

Docker Registry 2使ってみた

Last updated at Posted at 2015-09-03

参考

dockerの利点

  • jenkins で自動ビルド
    • ベンダーロックインの回避(クラウドベンダーの独自機能に縛られない)

docker registryの起動

5000番で待ち受け
docker run -d -p 5000:5000 \
  -v /data/registry:/tmp/registry \
  registry:2
  • コンテナ側: /tmp/registry/
  • ホスト側: /data/registry/

pushの準備

何かイメージを用意。実際は自前でBuildしたものを使うでしょう。
docker pull centos:6
tagをつける
docker tag centos:6 localhost:5000/centos`date -I`

push実施

localhostの5000番にpush
docker push localhost:5000/centos`date -I`

イメージ一覧

$ curl http://localhost:5000/v2/_catalog
{"repositories":["centos2015-09-03"]}
取得方法ほか
curl -s "http://localhost:5000/v1/search"
curl -s "http://localhost:5000/v2/_catalog"
curl -s "http://localhost:5000/v2/ubuntu/tags/list"

docker-composeでimages指定

docker-compose.yml
app:
  image: localhost:5000/centos2015-09-03
16
12
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
16
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?