Complete the Dockerfile line to combine two commands in one RUN instruction using the correct operator.
RUN apt-get update [1] apt-get install -y curlUsing && ensures the second command runs only if the first succeeds, which is best practice in Dockerfiles.
Complete the Dockerfile RUN command to update packages and clean cache in one line.
RUN apt-get update [1] apt-get upgrade -y [2] apt-get clean
Using && between commands ensures each runs only if the previous succeeds, which is safer for Docker builds.
Fix the error in this Dockerfile RUN command by choosing the correct operator to combine commands.
RUN mkdir /app [1] cd /app [2] git clone https://repo.url
Using && ensures each command runs only if the previous one succeeds, preventing errors in the build.
Fill both blanks to combine commands that update, install, and clean in one RUN instruction.
RUN apt-get update [1] apt-get install -y nginx [2] apt-get clean
Using && between commands ensures each runs only if the previous succeeds, which is best practice.
Fill all three blanks to create a RUN command that updates, installs curl, and cleans cache safely.
RUN apt-get update [1] apt-get install -y [2] [3] apt-get clean
Use && to chain commands safely and specify curl as the package to install.