Câu hỏi phỏng vấn Docker
Câu hỏi

Can you create containers wihout their own PID namespace?

Câu trả lời

Yes, you can create containers without their own PID namespace in Docker. By default, Docker creates a separate PID namespace for each container, which isolates the processes running inside the container from those on the host and other containers. However, you can configure a container to share the host's PID namespace by using the --pid flag with the value host when running the docker run or docker create command.

Here is an example command to create a container that shares the host's PID namespace:

bash Copy
docker run --pid host busybox:latest ps

In this configuration, processes inside the container will share the same PID space as processes on the host. This means that processes inside the container can see and interact with processes running on the host, which can lead to potential resource conflicts and security concerns. ...

middle

middle

Gợi ý câu hỏi phỏng vấn

senior

What is the difference between Docker RUN, CMD and ENTRYPOINT?

middle

What happens if you add more than one CMD instruction to a Dockerfile?

middle

Docker Compose vs. Dockerfile - which is better?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào