Score:0

I can't build docker image

bj flag

I try to build this simple dockerfile but its not working:

Dockerfil:

FROM nginx:latest
ADD . /usr/share/nginx/html

Command and output:

ife@ife-HP-ProBook-6560b:~$ docker build -t web:latest .
[+] Building 1.1s (2/2) FINISHED                                                
 => [internal] load build definition from Dockerfile                       0.9s
 => => transferring dockerfile: 2B                                         0.3s
 => [internal] load .dockerignore                                          0.7s
 => => transferring context: 2B                                            0.2s
failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount370739963/Dockerfile: no such file or directory
failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount370739963/Dockerfile: no such file or directory
Score:1
jp flag
Dan

This error is common when a Dockerfile is not found.

The default name for it is Dockerfile, and it is case-sensitive. If your file is called dockerfile, for example, make sure you capitalize the D in the filename.

Otherwise, you can pass the --file argument and overwrite the default name.

docker build -t web:latest --file custom-dockerfile .
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.