-
Notifications
You must be signed in to change notification settings - Fork 56
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
Support image components to use Dockerfile as component spec #1036
Comments
I spent some time working on this and have some proof-of-concept code for building containers in workspace initContainers. However, there are a few issues/open questions:
In addition to the above, we should consider other approaches to building containers -- for example, OpenShift provides |
Requirement
If the project includes a Dockerfile, the developer should be able to use it as a DevWorkspace component.
The specification
In the 2.2.0 Devfile API
image
components can reference a Dockerfile and a container can use that image:Implementation proposal
Similar to
project-clone
, the DevWorkspace controller could start animage-build
init-container to build and publish theimage
(the project should be cloned first to get the Dockerfile and the build context).The image registry, name and tag are inferred by the controller and are not exposed to the user:
The container component image that matches the selector is replaced with the inferred image/name/tag
Additional context
Full support of the image components is out of scope. In particular the DevWorkspace controller should raise a warning and ignore an image component that has:
autoBuild
set tofalse
dockerfile
referenced throughgit
or thedevfile registry
We should also clarify what are the scenarios for images with
autobuild: false
and that are not referenced by other components.The text was updated successfully, but these errors were encountered: