I installed Docker on EC2 and started it

Introduction

It is a memorandum when I installed Docker on EC2 (Amazon Linux2) and tried using it. Normally, I think that I will use a container infrastructure such as ECS or Elastic Beanstalk, so I may not have much opportunity, but I wrote it.

Install Docker on EC2

Log in to EC2

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

install git

$ sudo yum install git -y

Install Docker

$ sudo amazon-linux-extras install docker -y

Start Docker

$ sudo service docker start 

in conclusion

If you get an error like ERROR: Could n’t connect to Docker daemon at http + docker: // localhost – is it running?, Please refer to the article below.

https://qiita.com/u_query/items/14a31721a2870b735938

Recommended Posts

I installed Docker on EC2 and started it
I installed Docker on my Raspberry Pi 3
Until Docker Desktop is installed and started (Windows10)
I tried installing docker on an EC2 instance
Summary of Docker understanding by beginners ④ ~ Until EC2 instance is started and docker is installed ~
I installed CentOS 8 on Windows 10 using VirtualBox and Vagrant
Install docker on AWS EC2
[Docker] Build a site on Hugo and publish it on GitHub
I installed TinyTinyRSS on Cent OS 8
I installed F-Revo CRM 7.3 on CentOS 7.7
Build Metabase with Docker on Lightsail and make it https with nginx
I opened the menu bar (option menu) on Android and saw it.
Create a Docker Image for redoc-cli and register it on Docker Hub
UnsupportedClassVersionError was output when I placed the .war file built with Eclipse on EC2 and executed it.
I tried running Docker on Windows Server 2019
Launch docker container on EC2 (personal memorandum)
After understanding Docker, I actually introduced it.
Microservices 101-I tried putting Docker on Ubuntu-
Fat Can, Docker and I look back on the quotes of First Gundam
Building an environment for WordPress, MySQL and phpMyAdmin with Docker Compose on EC2
Install Docker on Raspberry Pi 4 and Raspberry Pi OS 64bit
Maybe it works! Let's get started with Docker!
Docker on Ubuntu18.04 on WSL2 and VSCode installation instructions
I tried running Ansible on a Docker container
I tried Getting Started with Gradle on Heroku
left4dead2 I made a Docker image for the server and tried running it on GCE # 3 (I had a hard time building the server)
Liberty on Docker
Create a Java (Gradle) project with VS Code and develop it on a Docker container
I started Ruby
I started Angular
[Rails AWS Docker] Build an existing Ruby on Rails + MySQL application with Docker and deploy it on AWS (5)
Ssh to Ubuntu on VirtualBox on your Mac and do it until you install Docker
[Rails AWS Docker] Build an existing Ruby on Rails + MySQL application with Docker and deploy it on AWS (6)
[Rails AWS Docker] Build an existing Ruby on Rails + MySQL application with Docker and deploy it on AWS (3)
[Rails AWS Docker] Build an existing Ruby on Rails + MySQL application with Docker and deploy it on AWS (2)
[Rails AWS Docker] Build an existing Ruby on Rails + MySQL application with Docker and deploy it on AWS (1)
Eh !? Run Linux on Windows? I can do it! !! (I set WSL2 and put Ubuntu)
[Rails AWS Docker] Build an existing Ruby on Rails + MySQL application with Docker and deploy it on AWS (4)
Create a Java (Maven) project with VS Code and develop it on a Docker container
EC2 on Docker-compose
Redmine on Docker
I want to use NetBeans on Mac → I can use it!
Import the instance and use it on another screen
Easily build Redmine on Windows using WSL2 and Docker
Deploy laravel using docker on EC2 on AWS ① (Create EC2 instance)
I started MySQL 5.7 with docker-compose and tried to connect
I tried using YOLO v4 on Ubuntu and ROS
GitHub Actions/Cache: Cache bundle installed gems on Docker container
Install Eclipse on Mac and translate it into Japanese
I tried using Docker Desktop for Windows on Windows 10 Home
I introduced Docker to Rails 6, so I summarized it (beginner)
[Docker] Build an Apache container on EC2 using dockerfile
I installed Squid on CentOS in my local environment
When I started ansible + docker now, I stumbled from the beginning, but I managed to start it