Docker Compose does not allow to use local images

后端 未结 9 1905
-上瘾入骨i
-上瘾入骨i 2020-12-24 00:33

The following command fails, trying to pull image from the Docker Hub:

$ docker-compose up -d
Pulling web-server (web-server:staging)...
ERROR: repository we         


        
9条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-24 00:53

    One can reference the local image name without a tag as well

    docker build -t imagename .
    

    can be referenced as:

    version: "3"
    services:
      web:
        image: imagename
    

    in the docker-compose yaml.

提交回复
热议问题