DoDo is a simple tool to run Docker containers in context of current project... and you probably don't need it.
This tool was growed up from shell one-liner: docker run --rm -it -v "$(pwd):/app" -w "/app" -u "$(id -u):$(id -g)"
.
Sometimes it's not safe to use some tools on your local machine, because it has some side effects, like running post-install scripts (like NPM does) or steal your passwords (like some packages in NPM does). But you need to run this tools, so it's more safe to run this in Docker container.
Just copy dodo.sh
to your $PATH
and make it executable.
dodo [<flags>...] <image> <command>
<flags>
: flags passes directly todocker run
command, see docs-e --env
;-p --publish
;-v --volume
;-w --workdir
, default is/home/dodo
, automatically maps via volumes;-u --user
, default is your current user and group:$(id -u):$(id -g)
;- any other flags causes an error;
<image>
: can be specific image (e.g.alpine
oralpine:latest
), path to directory with Dockerfile (e.g../deploy/docker
, always should start with./
) or path to specific Dockerfile (e.g../tests/Dockerfile.testing
);<command>
: some command to run in container, e.g.npm install