Complete the Dockerfile command to squash layers during build.
docker build [1] .The --squash option tells Docker to squash all layers into one during the build.
Complete the Docker build command to tag the image while squashing layers.
docker build [1] myimage:latest --squash .The --tag option assigns a name and tag to the image being built.
Fix the error in this Dockerfile line to squash layers by combining RUN commands.
RUN apt-get update && apt-get install -y curl && [1]Adding apt-get clean after installing packages helps reduce image size by cleaning cache, effectively squashing changes in one layer.
Fill both blanks to create a squashed image by combining commands in one RUN statement.
RUN [1] && [2] && rm -rf /var/lib/apt/lists/*
Combining apt-get update and apt-get install -y git in one RUN command reduces layers and helps squash them.
Fill all three blanks to create a dictionary comprehension that filters and transforms Docker image tags.
tags = {tag[1]:tag[2] for tag in images if tag[3] 'latest'}This comprehension splits the tag at '-', takes the first part as key, converts the tag to uppercase as value, and filters out tags equal to 'latest'.