이 제품은 선택한 Datadog 사이트에서 지원되지 않습니다. ().
이 페이지는 아직 한국어로 제공되지 않습니다. 번역 작업 중입니다.
현재 번역 프로젝트에 대한 질문이나 피드백이 있으신 경우 언제든지 연락주시기 바랍니다.

Metadata

Id: dockercompose-shared-host-network-namespace

Platform: DockerCompose

Severity: Medium

Category: Resource Management

Learn More

Description

Setting network_mode: host places a container directly on the host’s network stack, removing all network isolation and exposing every host network interface, port, and routing table to the container. This can allow a compromised container to intercept or inject traffic on any host network interface and expose services bound to loopback addresses. Services should use Docker-managed networks rather than host networking.

Compliant Code Examples

services:
  bridge:
    image: alpine
    network_mode: bridge
  default:
    image: alpine

Non-Compliant Code Examples

services:
  risky:
    image: alpine
    network_mode: host