Configuration

The following things are customizable at this point. For a complete list of configuration options refer to the devcontainer configuration group.

General configuration and startup

devcontainer-engine defines the container engine you want to use. The options are either 'docker (default) or 'podman.

devcontainer-startup-secrets-file defines the file that is passed to the devcontainer command as --secrets-file option. It can be used to inject environment variable into the built/startup process of the container without putting them into the container definition. Thus secrets like tokens to access resources like package dependencies don’t need to be put into the code base.

devcontainer-apply-customization defines whether to apply the customization defined for Emacs in devcontainer.json. By default ('ask) it will ask you if you want to apply it. Other options are 'always and 'never. For trusted projects you can set it project local in .dir-locals.el.

devcontainer-post-startup-hook is a hook variable that can provide functions that are called after the container has been started. They take a couple of arguments. It receives information on the devcontainer as parameters. See the functions’ documentation for details.

One example use case is to hook in the function devcontainer-tramp-dired to open a dired window inside the container right after the start of the container.

Command execution inside the container

devcontainer-execute-outside-container. Maybe you don’t want to execute all programs that Emacs launches by the compile command insider the container. For example programs like grep are preferably launched outside the container. You can set list of programs, not to be executed inside the container but on the host system.

There are the customization variables devcontainer-term-command, devcontainer-term-shell and devcontainer-term-environment to customize the terminal launched by devcontainer-term.