Run containerised tooling as if it were installed natively.
docker-alias
manages small helper binaries that forward every invocation into a Docker container. The project keeps your host clean, provides reproducible environments and handles user/permission issues so that containerised tools feel native.
- One command per tool: map frequently-used commands to dedicated containers and run them like local binaries
- Automatic user handling: optionally inject a user-switcher so files created in containers match your host permissions
- Config-driven workflow: describe containers, volumes, and overrides in a YAML file; reloads are handled by the daemon
- Smart image management: rebuild images when Dockerfiles change, or opt-out per container when you manage images yourself
- Shell-friendly:
$PATH
integration through generated shim binaries, support for per-command defaults, environment files, and conditional overrides
- Docker Engine >= 20.x
- Systemd (used by the installer to register the daemon)
Choose the option that best matches your environment.
wget -q -O - "https://gitlab.com/clecherbauer/tools/docker-alias/-/raw/v2.4.9/linux/online-installer.sh" | bash
The script downloads the latest release, installs binaries under ~/.local/docker-alias
, links docker-alias
and docker-alias-daemon
into ~/.local/bin
, and amends your shell rc files so the generated shims are on PATH
.
git clone https://gitlab.com/clecherbauer/tools/docker-alias.git
cd docker-alias/docker-alias
./setup.sh install
This copies the project into ~/.local/docker-alias
and prepares the CLI/daemon just like the online installer.
- Re-run either installer to upgrade in place; existing configuration files are preserved.
- Remove everything with
~/.local/docker-alias/setup.sh uninstall
.
- Start the daemon:
docker-alias-daemon start
(add--no-daemon
for foreground mode). - Create a configuration: write a
docker-alias.yml
describing your containers and volumes (seedocs/configuration-manual.md
). - Register the configuration:
docker-alias add
(optionally use--path /path/to/docker-alias.yml
). Shim binaries are generated immediately. - Verify commands:
docker-alias list
prints all generated commands and their backing docker invocations. - Run your tooling: execute the command name directly (for example
node
orpyinstaller
). The generated shim forwards the call into the configured container.
docker-alias add [--path <file>]
– Register adocker-alias.yml
and generate shim binaries immediately.docker-alias remove [--path <file>]
– Deregister a configuration file and prune its shim binaries.docker-alias list
– Show all tool commands and their resolved docker run syntax.docker-alias run <container|command> [args…]
– Run a container or command once without needing the shim.docker-alias build [all|<container>]
– Trigger an image build for all or selected containers defined in the YAML file.docker-alias enable|disable
– Toggle generation of shim binaries without deleting configuration.
The daemon accepts start [--no-daemon]
and stop
. On Linux the PID file defaults to ~/.config/docker-alias/docker-alias.pid
and can be overridden with DOCKER_ALIAS_PID_FILE
.
docker-alias.yml
files are discovered from the working directory upwards. Each registered file contributes containers and commands.- Global volumes, per-container volumes, networks, environment variables, command defaults, and conditional overrides are supported.
- Variables such as
$YAML_LOCATION_DIR
,$UID
,$DEFAULT_WORKING_DIR
, and environment variables are interpolated before Docker sees the configuration.
A full breakdown of the YAML structure, available attributes, and advanced features lives in the configuration manual.
- Shim binaries:
~/.local/docker-alias/bin
- CLI/daemon binaries:
~/.local/docker-alias
- Configuration & state:
~/.config/docker-alias
Keep these directories under version control or backup if you rely on customised defaults.
Issues and merge requests are welcome. Start by opening an issue in the project repository with your scenario, environment information, and relevant YAML snippets.