Docker ToolboxでのEC2インスタンス作成について質問させてください。
(Windows10 Home、Docker Toolbox 19.03.1使用)
行った手順:
IAMでユーザー作成、AdministratorAccessを付与、アクセスキーとシークレットアクセスキーをコピー
Docker Toolboxを管理者として実行
credentialファイルを作成
$ vim ~/.aws/credentials
でファイル作成と保存を試みたが以下のエラーが出たので、
'~/[-][読専] [unix] (07:16 17/01/2020)
warning (netrw) your hiding list is empty!
NetrwMessage[-][読専] [unix] (18:59 31/12/1969)
1,1 全てE21: 'modifiable' がオフなので、変更できません
以下サイトの情報を試したが変化なし。
Vimでmodifableがオフの場合の対処 : Vim
$ vim ~/.aws/credentials :set modifiable :set write
仕方ないのでtouchでファイル作成し保存
$ touch credentials [default] aws_access_key_id = *** aws_secret_access_key = *** $ cat credentials (内容表示を確認) $ ls -l total 1 -rw-r--r-- 1 *** 197609 116 1月 18 13:55 credentials (読み込みと書き込み可ファイルを確認)
以下のコマンドでEC2インスタンス作成を試みたが失敗。
$ docker-machine create --driver amazonec2 --amazonec2-open-port 8000 --amazonec2-region ap-northeast-1 aws-sandbox
Error setting machine configuration from flags provided: amazonec2 driver requires AWS credentials configured with the --amazonec2-access-key and --amazonec2-secret-key options, environment variables, ~/.aws/credentials, or an instance role
キーのコピペミスかと思い別ユーザーを作成してやり直しましたが、同じエラーになりました。
すみませんが、よろしければ解決策のご教授をお願いします。
追記:
$ docker-machine create --driver amazonec2 --amazonec2-access-key *** --amazonec2-secret-key ***--amazonec2-open-port 8000 --amazonec2-region ap-northeast-1 aws-sandbox
Running pre-create checks...
Creating machine...
(aws-sandbox) Launching instance...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with ubuntu(systemd)...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: C:\Program Files\Docker Toolbox\docker-machine.exe env aws-sandbox
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
aws-sandbox * amazonec2 Running tcp://3.112.210.237:2376 v19.03.5
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2020/01/20 03:02
退会済みユーザー
2020/01/22 01:53