Complete the Dockerfile command to set the base image.
FROM [1]The FROM command sets the base image for the Docker build. Here, ubuntu:20.04 is a valid base image.
Complete the Dockerfile command to copy files into the image.
COPY [1] /appThe COPY command copies files from the current directory (represented by .) into the image's /app directory.
Fix the error in the Dockerfile command to run a package update.
RUN apt-get [1] updateThe correct command to update package lists is apt-get update. Using install or upgrade here is incorrect.
Fill both blanks to optimize the Dockerfile by combining commands.
RUN apt-get [1] && apt-get [2] -y curl
Combining apt-get update and apt-get install -y curl in one RUN command reduces image layers and speeds up builds.
Fill all three blanks to create a dictionary comprehension that filters packages to install.
packages = {pkg: version for pkg, version in all_packages.items() if pkg [1] ['curl', [2], [3]]}This comprehension keeps only packages named 'curl', 'wget', or 'git' by checking if pkg is in the list.