因为 CoreOS 中 /usr/local/
不可写,安装在该目录中会提示失败。
但是 /opt/bin
目录可写,同时也在 path 路径下,那我们就可以这样安装。
xx~ # mkdir /opt/xx~ # mkdir /opt/binxx~ # curl -L https://github.com/docker/compose/releases/download/1.3.3/docker-compose-`uname -s`-`uname -m` > /opt/bin/docker-compose % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed100 403 0 403 0 0 1076 0 --:--:-- --:--:-- --:--:-- 1080100 7990k 100 7990k 0 0 2137k 0 0:00:03 0:00:03 --:--:-- 3176kxx~ # chmod +x /opt/bin/docker-composexx~ # docker-composeDefine and run multi-container applications with Docker.Usage: docker-compose [options] [COMMAND] [ARGS...] docker-compose -h|--helpOptions: -f, --file FILE Specify an alternate compose file (default: docker-compose.yml) -p, --project-name NAME Specify an alternate project name (default: directory name) --verbose Show more output -v, --version Print version and exitCommands: build Build or rebuild services help Get help on a command kill Kill containers logs View output from containers port Print the public port for a port binding ps List containers pull Pulls service images restart Restart services rm Remove stopped containers run Run a one-off command scale Set number of containers for a service start Start services stop Stop services up Create and start containers migrate-to-labels Recreate containers to add labels
然后 docker-compose 就可以正常使用了