Put this into .zshrc to make docker available in your current terminal
: $(docker-machine env --shell dev 2> /dev/null)
eval $("/c/Program Files/Docker Toolbox/docker-machine.exe" env --shell dev 2> /dev/null)
alias docker-start=". /path/to/dev-env/bin/docker-start.sh" # this alias will start docker-machine
# used to store shared libs, such as rvm ruby versions
docker run -it --name dev-store -v /store -d busybox
# change store permissions to give write access
docker exec -it dev-store /bin/sh
chmod a+w -R /store
# build with
cp config.yml.example config.yml # and edit it
make
# Starts a new docker dev container and mounts the current working dir
docker run --rm -v $(PWD):/work --volumes-from dev-store -it dev
# put bin/docker-dev.sh into path
alias docker="docker-dev.sh docker $*"
# usage
docker dev # to run the image on the current dir
docker dev -p 3000:3000 # with docker run options
# or
docker dev -p 3000 # short for -p 3000:3000
docker dev -- /bin/bash # use -- to append arguments
# would equal to: $ docker run -it ... dev /bin/bash
gem install bundle
bundle
rspec
https://pypi.org/project/docker-windows-volume-watcher/
pip install docker-windows-volume-watcher
# closes all open files that docker has opened over shared volume
# Works only on windows for now (no issues on linux and osx so far)
$ docker fix
docker setup mysql/postgres/mongodb/etc
or manually
docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -d mariadb
mysql -h dev.docker -uroot
# or non-interactively
mysql -h dev.docker -uroot -proot
docker run --name postgres -p 5432:5432 -e POSTGRES_PASSWORD=root -e POSTGRES_USER=root -d postgres
psql -h dev.docker -Uroot
# or non-interactively
PGPASSWORD=root psql -h dev.docker -Uroot
docker run --name mongodb -p 27017:27017 -d mongo
mongo --host dev.docker
# or non-interactively
mongo --host dev.docker -uroot -proot
docker run --name elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e "ES_JAVA_OPTS=-Xms512m" -d docker.elastic.co/elasticsearch/elasticsearch:5.6.1
curl -uelastic:changeme http://dev.docker:9200
docker run --name redis -p 6379:6379 -d redis
redis-cli -h dev.docker