Docker compose wrapper

dcw is Docker Compose Wrapper to simplify everyday dev work with containers.


dcw logo Docker Engine
dcw logo Docker Compose


curl -o /usr/local/bin/dcw -fsSL 
&& chmod a+x /usr/local/bin/dcw


Usage: dcw [OPTIONS] CMD

  A docker compose wrapper to simplify everyday dev work with containers

    -f, --file             Path to the docker compose file
    -s, --service          Name of docker compose service to run
    -p, --service-ports    Run command with the service's ports enabled and mapped
    -r, --run-options      Extra docker-compose run options (quote them)
    -h, --help             Display this usage description
    -v, --verbose          Display executed docker-compose command
    -d, --dry-run          Display docker-compose command aims to be executed
    -V, --version          Return dcw version

  You can also configure following environment variables, either putting then
  into a .dcw file in the current execution path of the command OR by
  exporting them.


  Most useful use cases examples:

    Run a simple command
    $ dcw ls /

    Run a command with some options
    $ dcw -- ls -lha /

    Run a command on a service wich need to bind ports
    $ dcw -p npm start /

Advanced usage

When you’re used to develop on some project repository, you probably want
preset some options to not repeat yourself typing commands.

So you can simply create a .dcw file at the root of your repository.

.dcw file example:

cat > .dcw <<EOL

Original URL:

Original article

Comments are closed.

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑

%d bloggers like this: