Public | Automated Build

Last pushed: 2 years ago
Short Description
Run docker-compose in a Docker container
Full Description

Usage

Run the image and mount Docker's UNIX socket into the container. This works also
with boot2docker on Mac OS X.

docker run -it \
           --rm \
           -v /var/run/docker.sock:/var/run/docker.sock \
           -v $(pwd):$(pwd) \
           -w $(pwd) \
           devstage/compose

Append docker-compose arguments and options.

docker run -it \
           --rm \
           -v /var/run/docker.sock:/var/run/docker.sock \
           -v $(pwd):$(pwd) \
           -w $(pwd) \
           devstage/compose up

Create an alias

For daily usage it is much more convenient to use an alias for the long command
in your .bashrc or .zshrc file.

alias docker-compose='docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):$(pwd) -w $(pwd) devstage/compose'

This will make the docker-compose command work as expected in the current
directory.

docker-compose up
Docker Pull Command
Owner
devstage
Source Repository

Comments (0)