Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kamal setup cannot find dockerfile #1263

Open
sealabcore opened this issue Nov 29, 2024 · 0 comments
Open

kamal setup cannot find dockerfile #1263

sealabcore opened this issue Nov 29, 2024 · 0 comments

Comments

@sealabcore
Copy link

When running kamal setup the command errors that it cannot find the docker file.

  INFO [0f784bc5] Running docker buildx inspect kamal-local-docker-container as miketaylor@localhost
  INFO [0f784bc5] Finished in 0.133 seconds with exit status 0 (successful).
  INFO [b6e7b96f] Running docker buildx build --push --platform linux/amd64 --builder kamal-local-docker-container -t 292743968775.dkr.ecr.us-east-1.amazonaws.com/maple/api:d1e232555319148ce35ec6e0ff36372c0cdc1084 -t 292743968775.dkr.ecr.us-east-1.amazonaws.com/maple/api:latest --label service="maple" --secret id="BUNDLE_GEMS__GRAPHQL__PRO" --secret id="BUNDLE_ENTERPRISE__CONTRIBSYS__COM" --file Dockerfile . as miketaylor@localhost
 DEBUG [b6e7b96f] Command: docker buildx build --push --platform linux/amd64 --builder kamal-local-docker-container -t 292743968775.dkr.ecr.us-east-1.amazonaws.com/maple/api:d1e232555319148ce35ec6e0ff36372c0cdc1084 -t 292743968775.dkr.ecr.us-east-1.amazonaws.com/maple/api:latest --label service="maple" --secret id="BUNDLE_GEMS__GRAPHQL__PRO" --secret id="BUNDLE_ENTERPRISE__CONTRIBSYS__COM" --file Dockerfile .
 DEBUG [b6e7b96f] 	#0 building with "kamal-local-docker-container" instance using docker-container driver
 DEBUG [b6e7b96f] 	
 DEBUG [b6e7b96f] 	#1 [internal] load build definition from Dockerfile
 DEBUG [b6e7b96f] 	#1 transferring dockerfile: 2B done
 DEBUG [b6e7b96f] 	#1 DONE 0.0s
 DEBUG [b6e7b96f] 	ERROR: failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory
 DEBUG [b6e7b96f] 	
 DEBUG [b6e7b96f] 	View build details: docker-desktop://dashboard/build/kamal-local-docker-container/kamal-local-docker-container0/sjx7w6dnj276744gtw4u6p4tm
  Finished all in 2.0 seconds
Releasing the deploy lock...
  Finished all in 5.7 seconds
  ERROR (SSHKit::Command::Failed): docker exit status: 256
docker stdout: Nothing written
docker stderr: #0 building with "kamal-local-docker-container" instance using docker-container driver

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 2B done
#1 DONE 0.0s
ERROR: failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory

View build details: docker-desktop://dashboard/build/kamal-local-docker-container/kamal-local-docker-container0/sjx7w6dnj276744gtw4u6p4tm

To debug I copied the docker build command it tried to run that couldn't find the Docker file manually, and it succeeds. This seems like it could be a bug with Kamal.

docker buildx build --push --platform linux/amd64 --builder kamal-local-docker-container -t 292743968775.dkr.ecr.us-east-1.amazonaws.com/maple/api:d1e232555319148ce35ec6e0ff36372c0cdc1084 -t 292743968775.dkr.ecr.us-east-1.amazonaws.com/maple/api:latest --label service="maple" --secret id="BUNDLE_GEMS__GRAPHQL__PRO" --secret id="BUNDLE_ENTERPRISE__CONTRIBSYS__COM" --file Dockerfile .

[+] Building 19.4s (14/21)                                                                                                                                   docker-container:kamal-local-docker-container
 => [internal] load build definition from Dockerfile                                                                                                                                                  0.0s
 => => transferring dockerfile: 2.82kB                                                                                                                                                                0.0s
 => resolve image config for docker-image://docker.io/docker/dockerfile:1                                                                                                                             0.7s
 => CACHED docker-image://docker.io/docker/dockerfile:1@sha256:865e5dd094beca432e8c0a1d5e1c465db5f998dca4e439981029b3b81fb39ed5                                                                       0.0s
 => => resolve docker.io/docker/dockerfile:1@sha256:865e5dd094beca432e8c0a1d5e1c465db5f998dca4e439981029b3b81fb39ed5                                                                                  0.0s
 => [internal] load metadata for docker.io/library/ruby:3.3.6-slim                                                                                                                                    0.3s
 => local://context                                                                                                                                                                                   0.0s
 => => transferring context: 865B                                                                                                                                                                     0.0s
 => docker-image://docker.io/library/ruby:3.3.6-slim@sha256:694f3ccb7edc9b39a455040a070f4140d4778692dd739c9359045de20ae82705                                                                          0.0s
 => => resolve docker.io/library/ruby:3.3.6-slim@sha256:694f3ccb7edc9b39a455040a070f4140d4778692dd739c9359045de20ae82705                                                                              0.0s
 => local://context                                                                                                                                                                                   0.1s
 => => transferring context: 153.72kB                                                                                                                                                                 0.1s
 => CACHED mkdir /rails                             

When I view the logs in docker desktop, it doesn't provide much more info other than it couldn't transfer the file?

Screenshot 2024-11-29 at 8 49 06 AM Screenshot 2024-11-29 at 8 50 49 AM

Any idea why kamal setup won't find the dockerfile, but manually running the same command will find the Dockerfile?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant