李明
|
看看官网是咋说的
https://github.com/AliyunContainerService/docker-machine-driver-aliyunecs
准备工作
base=https://github.com/docker/machine/releases/download/v0.14.0 && curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/tmp/docker-machine && sudo install /tmp/docker-machine /usr/local/bin/docker-machine
docker-machine version
安装阿里的docker-machine 的第三方
mkdir docker-machine# Download and unzip Aliyun ECS drivercurl -L https://docker-machine-drivers.oss-cn-beijing.aliyuncs.com/docker-machine-driver-aliyunecs_linux-amd64.tgz > driver-aliyunecs.tgz && tar xzvf driver-aliyunecs.tgz -C docker-machine && rm driver-aliyunecs.tgz mv docker-machine/bin/* /usr/local/bin mv /usr/local/bin/docker-machine-driver-aliyunecs.linux-amd64 /usr/local/bin/docker-machine-driver-aliyunecs && chmod +x /usr/local/bin/docker-machine-driver-aliyunecs
docker-machine create -d aliyunecs --help
开始安装
docker-machine create -d aliyunecs --aliyunecs-io-optimized=optimized --aliyunecs-instance-type=ecs.c5.large --aliyunecs-access-key-id=XXXX --aliyunecs-access-key-secret=XXXX --aliyunecs-region=cn-qingdao liming
docker-machine ls docker-machine ssh liming docker version
docker-machine env limingeval $(docker-machine env liming)
docker-machine env --unseteval $(docker-machine env --unset) 钱不是大风刮来的,了解完了记得删除docker-machine rm liming
PS:本章主要介绍的在阿里云上创建docker-machine的ecs,好处是直接这个机器就安装好了docker的工具,方便使用!直接可以docker-version是不是美滋滋! |
2018-08-20 10:09:26