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

Predefine DNS Servers in the VM #21

Open
HugoPlatzer opened this issue Oct 5, 2024 · 1 comment
Open

Predefine DNS Servers in the VM #21

HugoPlatzer opened this issue Oct 5, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@HugoPlatzer
Copy link

HugoPlatzer commented Oct 5, 2024

When trying to install linsk on my macbook (M1 chip, macos 15.0.1), setting up the VM with ./linsk build fails due to this error: bad address mirrors.alpinelinux.org. This is because the nameserver 10.0.2.3 that I guess udhcp sets up does not work.

To fix this, I changed this line in imgbuilder.go:

cmd := "ifconfig eth0 up && ifconfig lo up && udhcpc && true > /etc/apk/repositories && setup-apkrepos ...

to override the nameserver like so:

cmd := "ifconfig eth0 up && ifconfig lo up && udhcpc && echo 'nameserver 8.8.8.8' > /etc/resolv.conf && true > /etc/apk/repositories && setup-apkrepos ...

Maybe there is a better way to do this, but I can confirm linsk works on my system after making this change.

@AlexSSD7
Copy link
Owner

I think it's related to #1.

Speaking of predefining the DNS servers, that sounds like a good idea — something to put on the TODO list. Thanks for the suggestion!

@AlexSSD7 AlexSSD7 added the enhancement New feature or request label Oct 22, 2024
@AlexSSD7 AlexSSD7 changed the title Building alpine image fails on m1 macbook: nameserver not set up right Predefine DNS Servers in the VM Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants