A client that controls Docker containers in the development environment. It is designed to work alongside Docker Compose and has the objective to make easier common operations docker operations on development environment.
To install rd-docker type the following in a terminal window:
curl -sSL https://raw.githubusercontent.com/ResultadosDigitais/rd-docker/master/rd-docker-install | sudo sh
It will install rd-docker in your environment and if you use linux it will try to install Docker and Docker Compose as well. On Mac OS X you will need to manually install Docker after rd-docker is installed.
To configure rd-docker first be shure to have docker-compose.yml configured on your project folder. Then crate a file named rd-docker.config in your project folder like the following:
MAIN_CONTAINER_NAME="web"
APP_PREFIX="rdstation"
The name of the main container on docker-compose.yml. It's the container where the project server runs.
The prefix which will be used on container and volume names. Example:
All rd-docker commands should be executed on your project root folder.
Type the following to start your application server:
$ rd-docker start
To access a bash console inside your main container use the following command:
$ rd-docker console
To stop and remove all your project containers use the following:
$ rd-docker stop
If you want to run any other command on any of your Docker Compose containers use the following:
$ rd-docker exec "container name" "command"
These are the most common rd-docker commands. To see a list of all commands type the following:
$ rd-docker help
If rd-docker says that docker
or docker-compose
commands doesn't exist it means the there was some problem on docker automatic installation. When it occurs you must install them manually. Go to the following links to know more about manual installation:
Docker Engine instalation (Linux)
Docker Compose instalation (Linux)
Docker Toolbox instalation (Mac OS X 10.9+)