0 votes
in Docker by
What is the primary function of the .dockerignore file?

a) To list all images to be pulled from the Docker Hub

b) To specify commands to run inside a container

c) To prevent certain files and directories from being copied into an image

d) To provide metadata about a Docker image

1 Answer

0 votes
by
c) To prevent certain files and directories from being copied into an image

Explanation:

The .dockerignore file allows users to exclude files and directories from being copied to the image during the build process, much like .gitignore does for git repositories.
...