docker: “build” requires 1 argument. See 'docker build --help'

前端 未结 14 2008
太阳男子
太阳男子 2020-11-28 02:21

Trying to follow the instructions for building a docker image from the docker website.

https://docs.docker.com/examples/running_redis_service/

this is the er

14条回答
  •  抹茶落季
    2020-11-28 02:36

    Docker Build Command Format

    In your powershell : There is this type of error because you have not specified a path whith your Dockerfile.

    Try this:

    $ docker build -t friendlyhello:latest -f C:\\TestDockerApp\\Dockerfile.txt
    

    friendlyhello is the name you assign to your container and add the version , just use the :latest

    -f C:\TestDockerApp\Dockerfile.txt - you want to add a tag because the build command needs a parameter or tag - The DockerFile is a text document so explicitly add the extension .txt

    **Try this format :

    $ docker build -t friendlyhello:latest -f C:\\TestDockerApp\\Dockerfile.txt .**
    

提交回复
热议问题