5

I am taking a beginner course and not able to create an image on terminal.

Here is the course I am taking(Sorry, the course is in Japanese course but just for the reference). I am at 1:01:39 where he proceeds to create docker image.

First, the error message contained Failed to solve with frontend docker file.v0:failed to create LLB definition:the Dockerfile cannot be empty

I ran below command and managed to get rid of Failed to solve with frontend docker file.v0:failed to create LLB definition (Failed To Resolve With FrontEnd DockerFIle.v0):

export DOCKER_BUILDKIT=0
export COMPOSE_DOCKER_CLI_BUILD=0

Now I'm left with the Dockerfile cannot be empty

I saw in some page that people fail to locate because of not capitalized dockerfile but that's not my case.

enter image description here

I have also tried -f on the command to direct file

enter image description here

m4n0
  • 29,823
  • 27
  • 76
  • 89
chiyochinita
  • 53
  • 1
  • 1
  • 5
  • What is the actual command you're running? Does the file named `Dockerfile` exist in the directory you're passing as the argument to `docker build`? Can you replace "enter image description here" with these details as text? – David Maze Sep 05 '21 at 11:02
  • Could you by any chances have forgotten to save you changes on the dockerfile ? – Paulo Sep 10 '21 at 09:49

1 Answers1

18

I saw that you, don't save your dockerfile, try save changes and run docker build again.

Also saw same issue on github, it could be helpful

Try to change COPY to ADD

https://github.com/docker/compose/issues/5170

Makariy
  • 725
  • 7
  • 16