First, grab docker image from docker hubs repository docker pull amazonlinux run and get into its bash : docker run…