How to create instance using docker-machine in AWS

Generate ssh key pair

$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/vukor/.ssh/id_rsa): ./id_rsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in ./id_rsa.
Your public key has been saved in ./id_rsa.pub.
The key fingerprint is:
SHA256:FdEyXpQm3ef2N9yrcg/avihE0UaLrJ0RuAYiWVw4EhQ vukor@MacBook-Pro-Anton.local
The key's randomart image is:
+---[RSA 2048]----+
|.E*.o.  ..=*.o   |
| + = . ...*+B . .|
|  o o . .=+B   o |
|       ooo+     o|
|      ..So    ..o|
|         .     o+|
|        .    .  +|
|         . .+... |
|          .o+=+. |
+----[SHA256]-----+

Create instance

docker-machine create \
    --driver amazonec2 \
    --amazonec2-ami ami-xxx \
    --amazonec2-iam-instance-profile xxx \
    --amazonec2-private-address-only \
    --amazonec2-instance-type t2.medium \
    --amazonec2-ssh-user ubuntu \
    --amazonec2-ssh-keypath ./id_rsa \
    --amazonec2-subnet-id subnet-xxx \
    --amazonec2-vpc-id vpc-xxx \
    --amazonec2-zone a \
    --amazonec2-security-group xxx \
    docker-vm
 
blog.txt · Последние изменения: 2013/01/23 14:51 — Антон Бугреев · []