Closed intik closed 2 days ago
I get the same error when running kamal setup
for a Dockerized Next.js application. failed to read dockerfile: open Dockerfile: no such file or directory
#2 [internal] load build definition from Dockerfile
#2 transferring dockerfile: 2B 0.0s done
#2 DONE 0.1s
ERROR: failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory
When I run docker build -t nextjs-docker .
and then docker run -p 3000:3000 nextjs-docker
it works fine locally. But I get this error when I runkamal setup
: ERROR: failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory
@gorbulls456667 - have you committed the Dockerfile? @intik - I guess you probably have if it's in /tmp/kamal-clones/xxx/
.
Could you run kamal build remove
and try again? That will remove and recreate the builder.
After more digging I got a feeling that my Docker installation wasnt´t correct although it worked for local user.
I´ve reinstalled Docker with https://docs.docker.com/engine/install/ubuntu/ and now the kamal deploy
works!
Sorry for the false alarm and thanks.
Hi,
I´m trying simple deploy of base app with Kamal 2 and Rails 8 template.
When running
kamal deploy -v
in app folder I see some success steps of login on my machine, login on host machine, checking/installing docker on host, cloning of app into local tmp directory. Last successful command isdocker buildx inspect kamal-local-docker-container
.Then it runs command
docker buildx build --push --platform linux/amd64 --builder kamal-local-docker-container -t xxx/xxx:xxx -t xxx/xxx:latest --label service="xxx" --file Dockerfile .
which fails with:I checked both the origin app directory and the
/tmp/kamal-clones/xxx/
directory and both are containing the sameDockerfile
file.Could it be because of some wrong configuration or a bug?
Thanks