devcontainers-contrib/nanolayer

On debian-like distros, prevent interactive installs

Closed this issue · 1 comments

On debian-like distros (ie, those with apt or apt-get) some packages will attempt to perform configuration or otherwise request user interaction during install. This is obviously fatal when spinning up a devcontainer.

Note that this is most often observed with tzdata, which is often a dependency of any package that performs user interaction or general UI functionality (eg, if the environment is supposed to be working with one of the standard 'nix UI frameworks).
The traditional way to work around this - especially if you only need a UTC zone - is to add DEBIAN_FRONTEND=noninteractive to the install line. Note that you don't want to set this as a permanent environment variable, as it would affect any command lines spawned once the container is brought up.

Current workaround is to install whichever packages would require interaction inside the base dockerfile, but this is annoying in some cases.

thanks for the heads up! I agree the safest route would be to disable interactive by default. have added the environment variable as you suggested it in latest version (commit b470d28)