Docker build gives “unable to prepare context: context must be a directory: /Users/tempUser/git/docker/Dockerfile”

前端 未结 7 1818
野趣味
野趣味 2021-01-31 12:57

I have a Dockerfile that is supposed to build an Ubuntu image. But whenever I run

docker build -t ubuntu-test:latest ./Dockerfile

it shows the fo

7条回答
  •  深忆病人
    2021-01-31 13:37

    You can also run docker build with -f option

    docker build -t ubuntu-test:latest -f Dockerfile.custom .

提交回复
热议问题