热门面试题与答案和在线测试
面向面试准备、在线测试、教程与实战练习的学习平台

通过聚焦学习路径、模拟测试和面试实战内容持续提升技能。

WithoutBook 将分主题面试题、在线练习测试、教程和对比指南整合到一个响应式学习空间中。

面试准备

Docker 面试题与答案

问题 21. What is the purpose of the HEALTHCHECK instruction in a Dockerfile?

The HEALTHCHECK instruction adds a health check to a Docker image. It allows you to define a command to check the health of a running container and provide feedback to Docker.

Example:

HEALTHCHECK --interval=5m --timeout=3s CMD curl -f http://localhost/ || exit 1

这有帮助吗? 添加评论 查看评论
 

问题 22. How do you pass environment variables to a Docker container?

Environment variables can be passed to a Docker container using the `-e` or `--env` option with the `docker run` command.

Example:

docker run -e MY_VARIABLE=value my_image

这有帮助吗? 添加评论 查看评论
 

问题 23. Explain the concept of Docker Overlay Network.

Docker Overlay Network is a multi-host network that connects Docker containers using overlay drivers. It enables communication between containers running on different Docker hosts.

这有帮助吗? 添加评论 查看评论
 

问题 24. What is Docker Registry?

Docker Registry is a storage and distribution system for Docker images. It can be a public registry like Docker Hub or a private registry hosted within an organization.

这有帮助吗? 添加评论 查看评论
 

问题 25. How do you build a Docker image from a Dockerfile?

You can use the `docker build` command followed by the path to the directory containing the Dockerfile.

Example:

docker build -t my_image:latest .

这有帮助吗? 添加评论 查看评论
 

用户评价最有帮助的内容:

版权所有 © 2026,WithoutBook。