version: '2' services: registry: image: registry:2 restart: always hostname: registry container_name: registry # ports: # - "5000:5000" environment: - REGISTRY_HTTP_RELATIVEURLS=true expose: - 5000 volumes: - ./registry:/var/lib/registry - ./config.yml:/etc/docker/registry/config.yml - /opt/docker/secure:/etc/docker/ssl:ro - ./htpasswd:/etc/docker/htpasswd networks: mynet: ipv4_address: 172.110.0.101 networks: mynet: driver: bridge ipam: config: - subnet: 172.110.0.0/24