docker / dev-environments

60 stars 32 forks source link

Exit status 17: Dockerfile.devenv: no such file or directory #115

Open aquadiode opened 2 years ago

aquadiode commented 2 years ago

Describe the bug Attempting to create a docker-compose multi-stage dev environment. When trying to build pointing at URL https://github.com/aquadiode/snipe-it it clones, detects the repo language (PHP), then fails with the following message: `Resolving deltas: 100% (81616/81616), done. Detecting main repo language... Detected 'PHP' as the main repository language.

1 [internal] load .dockerignore

1 transferring context: 33B 0.0s done

1 CANCELED

2 [internal] load build definition from Dockerfile.devenv

2 transferring dockerfile: 2B 0.1s done

2 DONE 0.1s

failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount232100571/Dockerfile.devenv: no such file or directory exit status 17`

To Reproduce Steps to reproduce the behavior:

  1. Open Dev Environments tab in Docker Desktop for Windows (WSL)
  2. Click on Create (+)
  3. use the following URL https://github.com/aquadiode/snipe-it
  4. At Building Stack stage, error message appears.

Expected behavior Assuming I have the directory and file structure correct for the multi-stage docker-compose build for Dev Environments, Dockerfile (named Dockerfile.devenv as per Development Environment Preview documents in .docker folder at root) should be read after it is transferred to tmp location.

Desktop (please complete the following information):

Version of Docker Desktop:

`Preparing to clone inside a volume
Installing credential helpers... done
Cloning into '/code'...
remote: Enumerating objects: 126251, done.
remote: Counting objects: 100% (417/417), done.
remote: Compressing objects: 100% (184/184), done.
remote: Total 126251 (delta 244), reused 392 (delta 230), pack-reused 125834
Receiving objects: 100% (126251/126251), 135.94 MiB | 4.93 MiB/s, done.
Resolving deltas: 100% (81616/81616), done.
Detecting main repo language...
Detected 'PHP' as the main repository language.
#1 [internal] load .dockerignore
#1 transferring context: 33B 0.0s done
#1 CANCELED

#2 [internal] load build definition from Dockerfile.devenv
#2 transferring dockerfile: 2B 0.1s done
#2 DONE 0.1s
failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount232100571/Dockerfile.devenv: no such file or directory
exit status 17

I'm new to Docker and would love to use the Dev Environments preview to build and test php web apps with laravel. I can docker-compose build and docker compose up the application manually but there are permissions errors that occur in Laravel.Log. The official snipe/snipeit image works in a container without issues but I'd like to be able to switch branches and test them in isolation (which it seems like dev environments is meant for).