Azure / draft-classic

A tool for developers to create cloud-native applications on Kubernetes.
https://draft.sh
MIT License
3.93k stars 397 forks source link

Relative Dockerfile path fails to build #720

Closed EvanDarwin closed 6 years ago

EvanDarwin commented 6 years ago

I'm currently unable to build a docker image if it's in a relative path on Windows... 😢

PS > draft up
...
app-dev: Building Docker Image: FAIL ❌ (1.0000s)

PS > draft logs 01CCKHJMBRJZGQ7G7PAKJSBP0W
2018/05/03 10:42:43 error while building: Error response from daemon: Cannot locate specified Dockerfile: ./api/Dockerfile

PS > docker build ./api/
# works fine
Successfully built 8f8f4524e2f7

PS > draft version
&version.Version{SemVer:"v0.14.0", GitCommit:"e7a92f6b2f05a23f4cd9cc15fc24eb98d628e5d7", GitTreeState:"clean"}
bacongobbler commented 6 years ago

Good catch. I think @radu-matei found out about this too when he was testing out debugging Draft with the VSCode extension at KubeCon.

@radu-matei when you found the bug, you found that this is was a bug across the board and not just Windows, right?

radu-matei commented 6 years ago

Yes, the issue is not only on Windows, and it is actually a known bug in the Docker code we're vendoring that given the relative paths of the Dockerfile and context, returns the absolute paths.

I'll have to investigate whether newer versions of the said package solve this issue and come back with some updates here.

(Also updated the title of the issue to reflect that it's not a Windows-only problem).