#2301 Docker: fix can't tee resolv.conf file issue
Merged 2 years ago by praiskup. Opened 2 years ago by tommylike.
copr/ tommylike/copr nit/fix-tee-issue  into  main

@@ -8,8 +8,6 @@ 

  

  RUN dnf -y install dnf-plugins-core && dnf -y copr enable @copr/copr

  

- RUN echo 'nameserver 8.8.8.8' | tee -a /etc/resolv.conf

- 

  # base packages

  RUN dnf -y update && \

      dnf -y install htop \

Remove configure dns server code in dockerfile:
1. /etc/resolv.conf is a read-only file system in docker.
2. such of this option should be configured during boots.

Build succeeded.

Thank you for the PR @tommylike,
TIL that is possible to specify dns like this in docker-compose.yaml.

But, I think we don't need to specify the 8.8.8.8 in the first place? When I do

$ docker exec -it copr_frontend_1 bash
[copr-fe@frontend /]$ cat /etc/resolv.conf

the 8.8.8.8 isn't there and everything works as expected. I think we can remove the DNS configuration as a whole.

Thank you for the PR @tommylike,
TIL that is possible to specify dns like this in docker-compose.yaml.

But, I think we don't need to specify the 8.8.8.8 in the first place? When I do

$ docker exec -it copr_frontend_1 bash [copr-fe@frontend /]$ cat /etc/resolv.conf

the 8.8.8.8 isn't there and everything works as expected. I think we can remove the DNS configuration as a whole.

@frostyx Thanks for your reply, if this is not needed I can update this patch to only remove 8.8.8.8 from dockerfile

rebased onto a214f1f

2 years ago

Build succeeded.

Commit 6b0da95 fixes this pull-request

Pull-Request has been merged by praiskup

2 years ago
Metadata