Run any executable inside container on your machine in few seconds (e.g. go, node, ruby, python, elixir, etc.).
- Intialize new container from any docker images (e.g.
golang).
This will create
dpx.ymlconfig file in current directory.
dpx init golang:1.16-alpine- Set
$PATHvariable.
eval $(dpx path) - Link executable file and have fun!
# Create a link inside `.dpx/bin` directory
dpx link go
# Run any `go` command
go mod init appdpx is available on macOS via Homebrew.
brew install dpx/dpx/dpx
Packaged binaries can be downloaded from the releases page.
Execute a program inside container (equivalent to docker exec -it [container] [cmd]).
By default, all commands will inherit default configuration from defaults: section in dpx.yml file.
defaults:
envs:
- MODE=test
user: docker
workdir: /appThis will make every command that gets executed via dpx exec [cmd] inherits those settings.
Each command can also be configured with pre-define options.
envs set ENV before running a command.
commands:
node:
envs:
- NODE_ENV=testdpx exec node will be evaluated to NODE_ENV=test node in container.
options add options to your command.
commands:
ps:
options: auxdpx exec ps will add aux options to ps command (e.g. ps aux).
workdir set current working dir for a command.
commands:
ls:
workdir: /appdpx exec ls will be evaulated to $ /app ls
- Visual Studio Code - Once you've setup
$PATHvariable. Launchvscodefrom current directory withcode .command.
This will allow
vscodeto search for executable file under$PATHvariable.
COMMANDS:
init, i Setup docker image and create dpx.yml config file
start, s Start container from config
stop Stop a running container
exec, x Execute a command in container
link, l Link to an executable/binary inside container
ps Print current container ID
path Print $PATH variable
help, h Shows a list of commands or help for one command