Bind image on startup ignores /etc/default/named configuration
Bug #1969756 reported by
Matvey Teplov
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Docker Images |
Fix Released
|
Medium
|
Sergio Durigan Junior |
Bug Description
Container startup procedure at /usr/local/
#!/bin/bash
set -e
# allow arguments to be passed to named
if [[ "${1:0:1}" == '-' ]]; then
EXTRA_
set --
elif [[ "${1}" == "named" || "${1}" == "$(command -v named)" ]]; then
EXTRA_
set --
fi
# default behaviour is to launch named
if [[ -z "${1}" ]]; then
echo "Starting named..."
echo "exec $(which named) -g \"${EXTRA_ARGS}\""
exec $(command -v named) -u bind -g ${EXTRA_ARGS}
else
exec "${@}"
fi
Related branches
~sergiodj/ubuntu-docker-images/+git/bind9:bind9-user
Merged
into
~ubuntu-docker-images/ubuntu-docker-images/+git/bind9:9.18-22.04
at
revision 738992785e31c0fcc842765f12c9f8d667df0e9b
- Athos Ribeiro: Approve
- Bryce Harrington: Approve
- Canonical Server: Pending requested
-
Diff: 22 lines (+6/-2)1 file modifieddocker-entrypoint.sh (+6/-2)
Changed in ubuntu-docker-images: | |
status: | New → Triaged |
importance: | Undecided → Medium |
assignee: | nobody → Sergio Durigan Junior (sergiodj) |
To post a comment you must log in.
Thanks for taking the time to report the bug.
Initially I don't think it makes much sense to use /etc/default/named in order to configure named's initialization options. In the container world, it seems to me that it's much more common to control the behaviour of application via environment variables.
I agree that it should be possible for users to select which user will own the named process, so I went ahead and implemented support for a new environment variable, BIND9_USER, which can be set when creating the container.
The image has been rebuilt and retagged, so this new variable should be supported in the latest tag. We are working on updating the image documentation to reflect it as well. For this reason, I'm marking this bug as Fix Released. Let us know if this works for you.
Thanks.