Skip to content

A simple tool to run Docker containers in context of current project

License

Notifications You must be signed in to change notification settings

borodyadka/dodo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DoDo

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)".

Why?

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.

Installation

Just copy dodo.sh to your $PATH and make it executable.

Usage

dodo [<flags>...] <image> <command>

  • <flags>: flags passes directly to docker 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 or alpine: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

License

MIT

About

A simple tool to run Docker containers in context of current project

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published