This repository has tools to easy create and use environments inside docker containers.
dalias [options] [name[=value] ... ]
Create alias commands to run inside a Docker environment. You can use this tool to make your life easy and fast have some command-line tool usable in your system without install it.
For example:
dalias php='php:8.2-cli-alpine php "$@"' composer='composer:2.7 "$@"'After run this simple command line is possible to use PHP and composer in your system without install it, just running inside docker containers.
You can use the "daliases" just like normal binaries in your system. You just
need to add ~/.dalias/bin to your PATH variable and be happy.
More examples:
dalias node='node:20-alpine node "\$@"'
dalias yarnd='&node:20-alpine yarn "\$@"' # Run in background mode
dalias php='php:8.2-cli "\$@"'
dalias php-server='-p\${1-8000}:\${1-8000} php:8.2-cli-alpine php -S 0.0.0.0:\${1-8000}'denv [options] <command> [command-specific-options] [args]
Create a environment inside a docker container to easy install and use tools without polute your host system with packages that you will no longer use for another purposes.
Example:
denv create sandboxAfter create the environment, you can open a shell inside the container with:
sandbox bashAnother examples:
# Mount current path inside the container
denv create -v .:/app compile-project# Create an environment using Kali image
denv create -i kalilinux/kali-rolling kaliInstall with one line:
curl -sSL https://fd1.in/dalias-install | sudo bash -s -- -rTo see help:
dalias --help
denv --helpNote: To uninstall, just run ./install.sh -u. You can also delete
~/.dalias directory for remove no more needed configuration files,
volumes and scripts.
sudo ./install.sh -uFor security reasons, DO NOT add your user to docker group. An attacker
can escalate privileges in a system using an user account in docker group
as easy as run the command below:
docker run --rm -it -v /:/root/host bitnami/minideb:bullseye chroot /root/hostInstead, you can configure Docker rootless for your user. Please, read the following documentation: