GoogleContainerTools / GoogleContainerTools/skaffold
Docker builder should support separate dockerfiles for `dev` and `debug`
- Dominant language
- Go
- Stars
- 15.9k
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 10
Description
Users expect that `skaffold dev` and `skaffold debug` with file-sync will ✨magically✨ rebuild or relaunch their applications built using the Docker builder.
Although we do expose the `SKAFFOLD_RUN_MODE` as a build argument for docker builds, it is difficult to craft a Dockerfile rules to take advantage of it.
I can see two approaches:
1. Use the specified dockerfile and see if there is a `${dockerfile}.${runMode}` (e.g.,`Dockerfile.dev` or `Dockerfile.debug`). But it's impossible for the user to override.
2. Allow the dockerfile to be templated so that they can incorporate the `SKAFFOLD_RUN_MODE` environment variable.
3. Extend the `docker:` definition to allow specifying separate `devDockerfile` and `debugDockerfile` items.
Contributor guide
Assessment
This issue has not been assessed yet.