这里宿主机ip为:192.168.10.100
修改宿主机hosts
echo '192.168.10.100 registry.cw.net' >> /etc/hosts
配置
docker-compose.yml
# tell docker what version of the docker-compose.yml we're using
version: '3.1'
services:
registry:
image: registry
restart: always
container_name: registry
ports:
- ...