Steps involved:
- Launched EC2 instance
- Connect the EC2 instance and install docker, git, and Jenkins on it.
- Configure Jenkins on the server.
- After configuration, create a freestyle job on Jenkins.
- Configure the job ( Source code management: paste the URL of the repository and add the credential of GitHub) and then click on "Build now".
- Create a Dockerfile and Expose it at Port 8000 then edit the inbound rule and allow it anywhere.