LoginSignup
1
0

More than 3 years have passed since last update.

ローカルにDockerレジストリを立てる

Last updated at Posted at 2019-06-17

ローカルにDockerレジストリを立てることが何度かあって忘れそうなので、メモです。

1. 適当なイメージをプル

$ docker pull debian:stable-slim

2. プルしたイメージにタグをつける

$ docker tag debian:stable-slim localhost:5000/takuya/hogehoge:test

3. レジストリのコンテナを起動する

$ docker run -d -p 5000:5000 --restart always --name registry registry:2

4. プッシュする

$ docker push localhost:5000/takuya/hogehoge:test

5. プッシュされたか確認

http://localhost:5000/v2/_catalog にアクセスすると登録されたか確認できる

タグの一覧を確認する場合は、次のURLで確認。

http://localhost:5000/v2/<レポジトリ名>/tags/list

今回の場合は、
http://localhost:5000/v2/takuya/hogehoge/tags/list へアクセスする。

1
0
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
1
0