45
45

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 Private Registry の WebUI を発見したので試してみました。

Posted at

を読ませて頂いた後、docker-registry-frontend っていうのを Docker 公式ドキュメント Docker Registry API Client Libraries の中で発見しましたので、試してみました。なかなか良さそうです。

Vagrantfile
VAGRANTFILE_API_VERSION = "2"

DOCKER_REGISTRY_HOST = "docker-registry"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.define "docker-registry"

  config.vm.box = "yungsang/boot2docker"

  config.vm.network :forwarded_port, guest: 8080, host: 8080

  config.vm.provision :shell do |sh|
    sh.inline = <<-EOT
      sudo echo 'EXTRA_ARGS="--insecure-registry localhost:5000"' > /var/lib/boot2docker/profile
      sudo /etc/init.d/docker restart
    EOT
  end

  config.vm.provision :docker do |d|
    d.run "#{DOCKER_REGISTRY_HOST}",
      image: "registry",
      args: "--restart=always -p 5000:5000"
    d.run "docker-registry-frontend",
      image: "konradkleine/docker-registry-frontend",
      args: "--restart=always -p 8080:80 --link #{DOCKER_REGISTRY_HOST}:#{DOCKER_REGISTRY_HOST} -e ENV_DOCKER_REGISTRY_HOST=#{DOCKER_REGISTRY_HOST} -e ENV_DOCKER_REGISTRY_PORT=5000"
  end
end
$ vagrant up
$ docker ps
CONTAINER ID        IMAGE                                          COMMAND                CREATED             STATUS              PORTS                           NAMES
8d4d03f327d6        konradkleine/docker-registry-frontend:latest   "/bin/sh -c $START_S   11 minutes ago      Up 11 minutes       443/tcp, 0.0.0.0:8080->80/tcp   docker-registry-frontend
b952b4364782        registry:latest                                "docker-registry"      15 minutes ago      Up 15 minutes       0.0.0.0:5000->5000/tcp          docker-registry
$ docker pull yungsang/busybox
$ docker tag yungsang/busybox localhost:5000/busybox
$ docker push localhost:5000/busybox
$ open http://localhost:8080/#/repository/library/busybox/

下記の画面が出てきたら大成功です!

frontend.png

45
45
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
45
45

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?