Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gakas14/docker-on-aws-ec2-instance

Docker Installation on AWS EC2 Instance
https://github.com/gakas14/docker-on-aws-ec2-instance

aws containerization docker docker-image ec2-instance ngnix

Last synced: 8 days ago
JSON representation

Docker Installation on AWS EC2 Instance

Awesome Lists containing this project

README

        

# Docker-on-AWS-EC2-Instance
Docker Installation on AWS EC2 Instance. This is to show how to install Docker on an AWS EC2 instance. We'll walk you through setting up Docker on your Amazon EC2 server.

### Launch Amazon EC2

Screen Shot 2024-01-30 at 7 46 47 PM

Screen Shot 2024-01-30 at 7 47 08 PM

### Connect to instance

Screen Shot 2024-01-30 at 7 48 41 PM

### To Update the instance

```
sudo yum update -y

```

### Install Docker
```
sudo yum install docker -y
```
Screen Shot 2024-01-30 at 8 03 30 PM

### Start Docker
```
sudo service docker start
```
Screen Shot 2024-01-30 at 8 05 05 PM

### Check the service
```
sudo service docker status
```
Screen Shot 2024-01-30 at 8 06 46 PM

### Check the Docker version
```
sudo docker version
```
Screen Shot 2024-01-30 at 8 10 16 PM

### Let's search and pull the nginx image
```
sudo docker search nginx
sudo docker pull nginx
```
Screen Shot 2024-01-30 at 8 14 30 PM

### Check for the images on the docker
```
sudo docker images
```
Screen Shot 2024-01-30 at 8 15 37 PM

### Let's create a container with the nginx image
```
sudo docker run -d -p 80:80 nginx
sudo docker ps
```
Screen Shot 2024-01-30 at 8 20 02 PM

### Use the EC2 instance public IP to check for the Nginx welcome page
Screen Shot 2024-01-30 at 8 21 45 PM

### to stop a container
```
sudo docker stop
```
### to remove the image
```
sudo docker rmi
```