First Steps to take after starting your EC2 instance.
Me🤖
You Started Your EC2 and SSHED INTO IT SUCCESSFULLY GREAT WHAT NEXT?
Please run these sequence of commands in this order (NOTE THIS TUTORIAL IS FOR SETTING UP AN APP WITH EC2, DJANGO WITH DOCKER AND DOCKER COMPOSE)
-
- sudo yum update -y
- sudo yum install docker -y
- sudo service docker start
- sudo systemctl enable docker
- sudo usermod -aG docker ec2-user
- docker --version
- sudo docker run hello-world
- sudo yum update -y
- sudo yum install git -y
- git –version
- sudo curl -L "https://github.com/docker/compose/releases/download/v2.20.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
- docker-compose - -version
NB -> Restart your docker container if you receive any errors after all these commands i.e docker compose not found or docker compose commands not working…