Install the Docker service on AWS, and pull nginx image
Sin Henglong
0:00 / 0:00
Install the Docker service on AWS, and pull nginx image
1 просмотр · 9 дн. назад
Sin Henglong
1 просмотр · 9 дн. назад
In this video, I will show you guys how to install the Docker service in an AWS Cloud Instance, and pull the Nginx Images/Container to use.
Some commands will be included below:
1. Install Docker and auto-start the service
sudo apt install docker.io -y
sudo docker --version
sudo systemctl enable --now docker (enable service)
sudo systemctl start docker
id (check ID)
sudo usermod -aG docker ubuntu (give permission to "ubuntu user")
sudo reboot
2. Download images and run a container
docker image (check if you have the image)
docker run hello-world (download image "hello-world")
3. List all images and containers
docker images -a (Check all images)
docker ps -a (check all containers)
4. Remove the "hello-world" image
docker rm "container_id"
docker ps -a (check for the container again for existence)
docker rmi "image_id"
docker image -a (check for images again for confirmation)
5. Install Nginx container and access via port 8080
docker run -d -p 8080 nginx (Pull Nginx container)
docker images -a (should show nginx: latest)
docker ps -a (should show a container for nginx)
Access to the "ip:8080"
Enjoy!