To install Docker on Ubuntu:1. Update Package: sudo apt update2. Install Required Packages: sudo apt-get install ca-certificates curl3. Add Docker's official GPG key4. Add Docker RepositoryTo install Docker on AWS by provisioning:1. Provision EC2 Instance with desired specifications2. Paste the provided script in user data during instance setup3. Launch the instance and wait for it to be ready4. Verify Docker installation by running 'docker --version'