-1

I tried several solutions, but I was not able to get any of them to work.

Here is my code:

jing-Inspiron-3670:~$ sudo docker build . -f ./dockerfile . -t mhcflurry:latest .
[sudo] password for jing: 
"docker build" requires exactly 1 argument.
See 'docker build --help'.

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

Build an image from a Dockerfile
Gino Mempin
  • 25,369
  • 29
  • 96
  • 135
yueli
  • 43
  • 7
  • 1
    You have too many dots. A `.` means "present or current directory", so you just need 1 at the end. – Gino Mempin Jul 04 '21 at 09:32
  • Does this answer your question? [docker: "build" requires 1 argument. See 'docker build --help'](https://stackoverflow.com/questions/28996907/docker-build-requires-1-argument-see-docker-build-help) – Gino Mempin Jul 04 '21 at 09:33

1 Answers1

1

Move your flags, and the flag arguments, immediately after the docker build command.

Here is an example:

~/$ sudo docker build -f ./dockerfile -t mhcflurry:latest .
Gino Mempin
  • 25,369
  • 29
  • 96
  • 135
Gnut
  • 541
  • 1
  • 5
  • 19