Created
December 10, 2023 07:20
-
-
Save akashdktyagi/307b2eab61cad8e0a5781b33b7e5f4f6 to your computer and use it in GitHub Desktop.
Script to add to user data before creating AWS Ec 2 instance to install docker and nginx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !/bin/bash | |
sudo yum update -y | |
sudo yum install -y docker | |
sudo service docker start | |
sudo usermod -aG docker ec2-user | |
sudo chkconfig docker on | |
sudo yum install nginx -y | |
sudo systemctl start nginx | |
sudo systemctl enable nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment