| 123456789101112131415161718192021222324252627282930313233 |
- # Hardened run template for unbound-sec
- #
- # Security options enabled here:
- # - read_only root filesystem (writable paths via tmpfs)
- # - no-new-privileges (process can't gain privileges via setuid/setgid)
- # - cap_drop ALL (non-root user: no capabilities anyway)
- #
- # Usage: docker compose up -d
- name: unbound-sec
- services:
- unbound:
- image: unbound-sec:latest
- container_name: unbound
- ports:
- - target: 5053
- published: 5053
- protocol: tcp
- - target: 5053
- published: 5053
- protocol: udp
- volumes:
- - "./config:/config:ro"
- read_only: true
- tmpfs:
- - /tmp
- - "/run/unbound:uid=1500,gid=1500"
- security_opt:
- - no-new-privileges:true
- cap_drop:
- - ALL
- restart: always
|