Look for emulation by inspecting the output of the version command to see if a emulator is listed rather than the command itself. This occurs when singularity is being "emulated" by apptainer (via a simple symlink) and when docker is being emulated by podman (via a more full program which does CLI translation I assume).
Add an optional check for a workspace. This is opt-in so that denv check can still be used beforedenv init in order to check its own installation. denv check --workspace does all the installation checks as well as looking for an available workspace to run from. This can be helpful for users to debug and make sure that denv is picking up the workspace they want it to.
Label which runner is specified by DENV_RUNNER if it is defined.
Error out if DENV_RUNNER is defined to a runner that is not supported by denv or is not available on the machine.
:boom: Breaking Change
After testing the emulation inspection on my NixOS machine, I found that (for denv's purposes) using podman's emulation of docker breaks the ownership model we require. With this in mind, I changed the order of runner deduction so that emulators are always checked before the emulated (i.e. podman before docker and apptainer before singularity). This is a breaking change for systems that have both podman and docker installed because now podman will be used by default rather than docker.[^1]
[^1]: By "both installed", I mean docker is not just being emulated by podman. You can check this by running docker version and seeing if it calls itself podman or not.
This PR adds some new features to
denv check
version
command to see if a emulator is listed rather than the command itself. This occurs whensingularity
is being "emulated" byapptainer
(via a simple symlink) and whendocker
is being emulated bypodman
(via a more full program which does CLI translation I assume).denv check
can still be used beforedenv init
in order to check its own installation.denv check --workspace
does all the installation checks as well as looking for an available workspace to run from. This can be helpful for users to debug and make sure thatdenv
is picking up the workspace they want it to.DENV_RUNNER
if it is defined.DENV_RUNNER
is defined to a runner that is not supported by denv or is not available on the machine.:boom: Breaking Change
After testing the emulation inspection on my NixOS machine, I found that (for
denv
's purposes) usingpodman
's emulation ofdocker
breaks the ownership model we require. With this in mind, I changed the order of runner deduction so that emulators are always checked before the emulated (i.e. podman before docker and apptainer before singularity). This is a breaking change for systems that have both podman and docker installed because now podman will be used by default rather than docker.[^1][^1]: By "both installed", I mean docker is not just being emulated by podman. You can check this by running
docker version
and seeing if it calls itself podman or not.