https://github.com/docker/compose
安装
-
curl -L https://github.com/docker/compose/releases/download/1.8.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-composechmod +x /usr/local/bin/docker-compose
mysql:
image: mysql ports: - "3306:3306" environment: MYSQL_ROOT_PASSWORD: password postgre: image: postgres ports: - "5432:5432" mongo: image: mongo ports: - "27017:27017" memcached: image: memcached ports: - "11211:11211" redis: image: redis ports: - "6379:6379" elasticsearch: image: elasticsearch ports: - "9200:9200" - "9300:9300"
本地的mysql,postgres,mongo, memcached, redis, es
要测试了就直接使用docker-compose up -d mysql起来一个,很方便