Skip to content

Instantly share code, notes, and snippets.

@akashdktyagi
Created December 10, 2023 07:20
Show Gist options
  • Save akashdktyagi/307b2eab61cad8e0a5781b33b7e5f4f6 to your computer and use it in GitHub Desktop.
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
# !/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