cd Terraform-Ubuntu-EC2/
terraform init
terraform plan
terraform apply
docker run -d -p 8080:8080 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v [your_volume]:/var/jenkins_home \ // Optional
--name Jenkins \
[your_image_name]
# Access Jenkins using the EC2 IPv4-Public-DNS:8080
Manage Jenkins > Manage Credentials > Global > Add Credentials
Make sure to use Dockerhub access token instaed of the password
Dockerhub > Account Settings > Security > New Access Token
Choose pipeline, if not found you can install it from Manage Jenkins > Manage Plugins
In Pipeline Section in the end of the page choose Pipeline script from SCM > Add Github Repository link > Using Github Credentials
Make sure you choose the right branch and the right path of the Jenkinsfile
# Access your web_app using the EC2 IPv4-Public-DNS:5000