Tools to easily get going with your docker-container. Start, stop, restart, build or execute (!) a command on your docker-container as easy as 1 2 3.
- Docker - Your development container
- (Optional) Viscocity or Tunnelblick - Manages your VPN connections
Start with cloning this repository to your local machine.
git clone https://github.com/LowieHuyghe/docker-tools.git
- Make a copy of
config.example.sh
and rename it toconfig.sh
. - Change the configuration to your needs.
- Read Usage
- Enjoy!
These script were mainly meant to be used with aliases so you can setup your docker-container as easy as 123.
alias mydocker-start="~/Path/to/start.sh"
Add these to the startup script of your favorite shell and you're all set.
nano ~/.bashrc
Used to start the docker-container. It will automatically check your Viscosity-connection (when configured) and make sure the dns-settings are correct inside docker (when configured)
./start.sh
Used to run a command or a script-file inside the docker-container.
./exec.sh #opens shell on docker-container
./exec.sh echo something
./exec.sh "echo something && echo something else"
./exec.sh somefile.sh
Used to stop the docker-container. It also removes the cached docker-container (not the docker-image) to make sure that after a rebuild it uses the newly created docker-image.
./stop.sh
Used to start and stop the docker-container.
./restart.sh
Used to (re)build the docker-image.
./build.sh
Used to stop the docker-machine. Forced stopping is optional.
./kill.sh
./kill.sh -f #Force stop the virtual machine.