A tool based on make
which make docker operating simpler, it can be a alternative of docker-compose.
cd ~ # chose a dir to store path
curl -sSL https://raw.githubusercontent.com/wolfogre/docker-make/master/auto-download.sh | sh -
cd docker-make # there is all you need
cd docker-make
mkdir my-mysql
cp sample/Makefile my-mysql/
cd my-mysql
vim Makefile
Pay attention : you should rewrite the NAME
and run:
only, until you know what you are doing, for example:
NAME=my-mysql
VOLUME=$(VOLUME_ROOT)/$(NAME)
include ../Generalfile
run:
docker run --name=$(NAME) -v $(VOLUME)/var/lib/mysql:/var/lib/mysql -p 3306:3306 -d mysql
make run
you can use make help
to see more opration, like make stop
, make restart
and make rm
etc.