coder / envbuilder

Build development environments from a Dockerfile on Docker, Kubernetes, and OpenShift. Enable developers to modify their development environment quickly.
Apache License 2.0
111 stars 23 forks source link

Sanitize the final container image for envbuilder #217

Closed mafredri closed 3 weeks ago

mafredri commented 1 month ago

As part of https://github.com/coder/envbuilder/issues/128, we want to sanitize the container images that are pushed to a registry (see https://github.com/coder/envbuilder/pull/213 for the push implementation).

The motivation is that when running a pre-built image, envbuilder should be able to perform the tasks listen in devcontainer.json to finalize the environment (e.g. run scripts).

Example sanitization directives that can be appended to the Dockerfile:

USER root
WORKDIR /
ENTRYPOINT ["/.envbuilder/bin/envbuilder"]

Note, ENTRYPOINT is dependent on #216.