I want to create an image from Dockerfile

Asked 1 years ago, Updated 1 years ago, 35 views

I want to build it (windows).

Enter the following at the command prompt

docker build-t jlab:latest/Users/name/Desktop/MyDocker

When you run it,

"docker build"requires exact1 argument.
See'docker build --help'.

Usage: docker build [OPTIONS] PATH | URL | -

Build an image from a Dockerfile

It turns out that
According to YouTube, which I use, successfully builds will be completed.

I tried the following three, but there was no change.

  • DTie the directory where Dockerfile is stored with ""
  • DGo to the directory where the Dockerfile is stored, and then run it like docker build-t jlab:latest.
  • 3docker build-t jlab: specify Dockerfile with latest-f/path/to/Dockerfile and -f options

It's an addition.There was a blank space in my pass."When I surrounded the directory where the Dockerfile was stored with "", it didn't look like the above, but it turned out to be as follows."

invalid argument" jlab:latest\\Users\\FamilyName△FirstName\\Desktop\\MyDocker" for" -t, --tag" flag:invalid reference format
See'docker build --help'.

Please let me know

python windows docker

2022-09-30 15:31

2 Answers

As you can see in the error message.

"docker build" requires exactly 1 argument.

Regardless of docker or Windows, this is a generalization of how programs start on a computer.Arguments are separated by spaces and so on, and are interpreted separately as having spaces in the Path name. You must specify in the program that they are a single string by "/Users/name/Desktop/MyDocker" and so on.


2022-09-30 15:31

Go to the directory where the Dockerfile is stored and do the following or

 docker build-t jlab:latest.

-f Try specifying a Dockerfile in the -f.

 docker build-t jlab:latest-f/path/to/Dockerfile


2022-09-30 15:31

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.