Linux/Docker/Registry: Difference between revisions

From Wiki
< Linux‎ | Docker
Line 29: Line 29:
<pre>
<pre>
{
{
     "insecure-registries":["192.168.99.100:5000"]
     "insecure-registries":["vm-docker:5000"]
}
}
</pre>
</pre>


== Load image from registry ==
== Load image from registry ==

Revision as of 16:55, 6 December 2021

Example docker-compose.yml

version: '3'

services:
  registry:
    image: registry:2
    ports:
    - "5000:5000"
    environment:
      REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /data
    volumes:
      - /srv/docker-data/registry:/data
docker-compose up -d

Put example image in registry

docker pull alpine
docker tag alpine vm-docker:5000/my-alpine
docker push vm-docker:5000/my-alpine

On testing client disable secure registry

  • /etc/docker/daemon.json
{
    "insecure-registries":["vm-docker:5000"]
}

Load image from registry

docker pull vm-docker:5000/my-alpine