sdk-container-builds
sdk-container-builds copied to clipboard
Automation/tooling support for building a local Dockerfile as a 'base image'
One of our escape hatches for users that have a need to customize their base image with RUN commands (or any other functionality that we can't support) is to put just those customizations in a Dockerfile and then build and use that. It would be nice if we had a smooth, documented pathway to making that happen in the easy cases.
We might need to support:
- invoking a build of a Dockerfile
- in a given Docker build context,
- with Build Args and
- a tagged image name
in a seamless manner.
Spitballing minimum effort approach: should we doc something like having a custom target that hooks before the container stuff that does something like docker build whatever -t mybaseimage:latest + use mybaseimage:latest as your base? There's still a missing "get the manifest info from local daemon instead of a registry" step.
This is I think a duplicate of https://github.com/dotnet/sdk-container-builds/issues/125 - broadly yes we would like to have some kind of way of saying "use this specific Dockerfile as the build base", but there are more knobs to support (like which mechanism to use to build the image, what platform, etc) that we'd need to think about as well. And especially with the incoming multi-architecture support, what would this look like in that world? Happy to continue the discussion over in that issue, though!
Originally posted by @baronfel in #599
Recent versions of .NET introduced support for .esproj project type and SpaProxy package. These simple, yet powerful tools allows smooth integration with any frontend framework. Maybe something similar could be invented for containers? It does not have to be perfect. When it convers 80% of use cases, it's still good.
Regarding the multi-architecture - when a user uses this, an appropriate base image must be selected.
Spitballing minimum effort approach: should we doc something like having a custom target that hooks before the container stuff that does something like
docker build whatever -t mybaseimage:latest+ usemybaseimage:latestas your base? There's still a missing "get the manifest info from local daemon instead of a registry" step.
The "local base image" step is tracked in this repo as https://github.com/dotnet/sdk-container-builds/issues/583.