I am unable to build docker file from docker image. (docker build -t thisismyfirstdocker .
)
PS C:\Docker1\python-image> docker build -t thisismyfrstdocker .
[+] Building 0.2s (2/2) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 31B 0.0s
=> [internal] load .dockerignore 0.1s
=> => transferring context: 2B 0.0s
ERROR: failed to solve: the Dockerfile cannot be empty
ERROR: failed to solve: the Dockerfile cannot be empty
I am trying to build dockerfile in vscode and expecting to build it but I got the error:
ERROR: failed to solve: the Dockerfile cannot be empty
There are some know issues that cause this:
not capitalized dockerfile
point to the build by -f
flag:
docker build -t thisismyfirstdocker -f somefile .
Change COPY
to ADD
. (Here)