0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Windows10にDockerをインストールした

Posted at

※追記
結局UbuntuやVSCodeからDockerを使うことが多い

前提

AWS CLIは導入初期設定ずみ

教材

コマンドプロンプトで確認

docker --version

実作業

docker run hello-world

docker pull python:3.6

docker run --name python36 -i -t python:3.6 /bin/bash

python --version

exit

docker run -it python:2.7 /bin/bash

python --version

exit

docker start python36
docker attach python36

pip install awscli --upgrade --user

echo 'export PATH=~/.local/bin:$PATH' >> ~/.bashrc

source ~/.bashrc

aws --version

exit

docker commit python36 my_awscli

PCのCドライブにdataというフォルダを作る

docker run -it -v C:\data:/root/data my_awscli /bin/bash

root@***:/# aws configure
AWS Access Key ID [None]: HOGEHOGE <== ここ
AWS Secret Access Key [None]: FUGAFUGA <== ここ
Default region name [None]:ap-northeast-1
Default output format [None]:(Enter)

(疎通確認)
root@df2f35df4933:~# aws s3 ls

cd
aws ec2 create-key-pair --key-name ecs --query 'KeyMaterial' --output text > /root/data/ecs.pem
cp /root/data/ecs.pem ~/ecs.pem
chmod 400 ~/ecs.pem

cd /root/data/

cd /root/data/
wget https://raw.githubusercontent.com/ambasad/devio-blog-cfn/master/ecs/EC2ContainerService.json
wget https://raw.githubusercontent.com/ambasad/devio-blog-cfn/master/ecs/EC2ContainerService-param.json

チェック

aws cloudformation validate-template --template-body file://EC2ContainerService.json

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?