Complete the code to run a Docker container from the nginx image.
docker run [1] nginxThe -d option runs the container in detached mode, meaning it runs in the background.
Complete the command to list all Docker containers, including stopped ones.
docker ps [1]The -a option shows all containers, including those that are stopped.
Fix the error in the command to build a Docker image from a Dockerfile.
docker build -t [1] .The -t option tags the image with a name. 'myimage' is a valid image name.
Fill both blanks to create a Docker volume and mount it to a container.
docker volume [1] mydata && docker run -v mydata:[2] nginx
create makes a new volume named 'mydata'. Mounting it to /data inside the container shares the volume.
Fill all three blanks to write a Dockerfile that uses an alpine base image, copies a file, and runs a command.
FROM [1] COPY [2] /app/ CMD ["[3]"]
The base image is alpine. We copy script.sh into the container. The command sh runs the shell.