Is it possible to install devcontainer features in production container builds?

189 Views Asked by At

I make a lot of use of OCI devcontainer features to quickly and easily install an up-to-date stack into devcontainers (more info in this blog post).

But I want my production containers to be built with the same stack (minus the development-specific stuff), and presently I have to manually maintain production dockerfiles to mimic the stack that my devcontainer features install anyway.

How can I build a generic dockerfile such that a specified set of devcontainer features get added to it?

I'm looking for something like

docker build --features my_features.json .

Is this possible?

This question is inspired by this post on the python-poetry repo where everyone in the world wants poetry installed to a different base image! A related but less specific question here.

0

There are 0 best solutions below