0
1

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.

EC2にDockerをインストールして起動してみた

Last updated at Posted at 2020-11-15

はじめに

EC2 (AmazonLinux2)にDockerをインストールして使ってみた時の備忘録です。
普通はECSやElasticBeanstalkなどのコンテナ基盤を使うと思うので、あまり機会はないかもですが書いてみました。

EC2でDockerをインストールしていく

EC2にログインします

$ ssh -i ~/.ssh/****.pem ec2-user@***.***.***.***

git をインストール

$ sudo yum install git -y

Docker をインストール

$ sudo amazon-linux-extras install docker -y

Docker を起動

$ sudo service docker start 

おわりに

もし ERROR: Couldn’t connect to Docker daemon at http+docker://localhost – is it running? みたいなエラーが出ればこちら↓の記事を参考にしてみてください。

0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?