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

Problem with Unbound in docker-compose #9

Closed
tiberio87 opened this issue Jul 16, 2022 · 2 comments
Closed

Problem with Unbound in docker-compose #9

tiberio87 opened this issue Jul 16, 2022 · 2 comments

Comments

@tiberio87
Copy link

Hi, I have a problem with your docker compose. Here is the error that comes out when I start:

Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/home/tiberio/docker/unbound/forward-records.conf" to rootfs at "/opt/unbound/etc/unbound/forward-records.conf": mount /home/tiberio/docker/unbound/forward-records.conf:/opt/unbound/etc/unbound/forward-records.conf (via /proc/self/fd/6), flags: 0x5001: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

@zilexa
Copy link
Owner

zilexa commented Jul 17, 2022

The error says what you did wrong. You probably do not have this file:
$DOCKERDIR/unbound/forward-records.conf if you don't have it, there is nothing that can be mapped into the container.

The mapping is handy if you want to know how Unbound is configured and use it to select the upstream DNS servers of your preference.
But you have to create it (or get the default file from the maintainer GitHub account as starting point). If not, just use the default by removing the volume mapping in your Compose file.

I will remove the volume mapping from my docker compose example to prevent confusion.

Please always check the actual image/container documentation when you have questions.

@zilexa
Copy link
Owner

zilexa commented Jul 18, 2022

I've removed that line from the example and notice I also changed the image. See changelog for more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants