containerized development environments across many runners
Develop code in identical command line interface environments across different container managers and their runners.
Containerization of code has only grown in popularity since it (almost) completely removes issues of dependency incompatibility. More recently, even developing code within a container has grown in popularity leading to several approaches.
The main problem I have with all of the alternatives is lack of support for my specific workflow.
I not only use my personal computer (with docker or podman) but I also commonly use academic
High Performance Computers or Clusters (HPCs) which tend to have apptainer or singularity installed
due to their better support for security-focused (lack of user access) installations.
This is the main origin for denv
- provide a common interface for using images as
a development environment across these four container managers.
In general, most of these alternatives are either more popular than denv or maintained by larger groups of people (or both), so I would suggest using one of these projects if they work for your use case.
nix
, written in go
podman
, similar in spirit to distrobox and devboxpodman
, focused on specifying a manifest file which is then evolved into a lock file specifying SHAs for container images and packages, allows env to only evolve when developer desires.nix
package manager (I think).Install the latest release on GitHub.
curl -s https://raw.githubusercontent.com/tomeichlersmith/denv/main/install | sh
Make sure the installation was successful (and you have a supported runner installed)
denv check
Initialize the current directory as a denv.
denv init <dev-image-to-use>
Open an interactive shell in the newly-created denv
denv
After initialization (above), the rest of the denv
-specific subcommands are housed under denv config
,
which allow you to
denv config image <image-tag>
denv config image pull
denv config env all off
denv config env copy foo=bar
denv config env copy host_foo
denv config network off
denv config mounts /full/path/to/my/other/dir
denv config print
denv config shell /path/to/program
See denv help
or man denv
for more details about denv
and its subcommands.