Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow non root usage #135

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 9 additions & 5 deletions docker-compose/bind9/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ services:
bind9:
image: ubuntu/bind9:latest
container_name: bind9
environment:
- BIND9_USER=bind
ports:
- "53:53"
- '53:53/tcp'
- '53:53/udp'
- '127.0.0.1:953:953/tcp'
volumes:
- /etc/bind/:/etc/bind/
- /var/cache/bind:/var/cache/bind
- /var/lib/bind:/var/lib/bind
restart: unless-stopped
- './config:/etc/bind:ro'
- './cache:/var/cache/bind:rw'
- './records:/var/lib/bind:rw'
restart: unless-stopped
9 changes: 9 additions & 0 deletions docker-compose/bind9/set-bind.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
# before running the docker image, run this script to set the
# uid to 100 and gid to 101. This is based on the bind user in the Ubuntu docker image
#:/# grep bind /etc/passwd
#bind:x:100:101::/var/cache/bind:/usr/sbin/nologin
#
chown 100:101 -R cache
chown 100:101 -R config
chown 100:101 -R records