Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Cannot complete install-dnsmasq with docker #245

Open
queglay opened this issue Jan 31, 2022 · 0 comments
Open

Cannot complete install-dnsmasq with docker #245

queglay opened this issue Jan 31, 2022 · 0 comments
Labels

Comments

@queglay
Copy link

queglay commented Jan 31, 2022

Describe the bug
If we run install-consul and install-dnsmasq, restarting the service is required, but docker has permissions issues doing this.

To Reproduce
Build with these lines in docker ( I'm using the container public.ecr.aws/codebuild/amazonlinux2-x86_64-standard:3.0 ):

RUN git clone https://github.com/hashicorp/terraform-aws-consul.git /tmp/terraform-aws-consul

RUN /tmp/terraform-aws-consul/modules/install-consul/install-consul --version "1.9.2"

RUN /tmp/terraform-aws-consul/modules/install-dnsmasq/install-dnsmasq

RUN service dnsmasq restart

Errors with:

Step 12/13 : RUN /tmp/terraform-aws-consul/modules/install-dnsmasq/install-dnsmasq
 ---> Using cache
 ---> a568968bbf5b
Step 13/13 : RUN service dnsmasq restart
 ---> Running in 748942c25237
Redirecting to /bin/systemctl restart dnsmasq.service
Failed to get D-Bus connection: Operation not permitted

I also tried according to the readme:

RUN /etc/init.d/dnsmasq restart

...but that path is incorrect:

 ---> a568968bbf5b
Step 13/13 : RUN /etc/init.d/dnsmasq restart
 ---> Running in 83873b284ef6
/bin/sh: /etc/init.d/dnsmasq: No such file or directory

I'm guessing it would have the same permissions issues anyway.

Expected behavior
It should be possible to restart dnsmasq for use with docker.

@queglay queglay added the bug label Jan 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant