Closed abuaboud closed 2 years ago
I think the issue is with binding /etc/
Running cat /etc/resolv.conf
works without isolate, while running
./isolate --share-net --full-env --dir=/etc/:rw --run /bin/cat /etc/resolv.conf
The output would be
/bin/cat: /etc/resolv.conf: No such file or directory
Exited with error status 1
I found the issue, the /etc/resolv.conf on my machine is a symbolic link, so the symbolink exists in the sandbox but it's unreadable as the end file is not bounded.
I tested it inside docker where /etc/resolv.conf is a static file rather symbolink, the code worked as expected.
If you want to check if the file is symbolink or not run the following command
ls -la /etc/resolv.conf
I got the following output
lrwxrwxrwx 1 root root 39 Dec 8 19:48 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf
I am trying to use isolate to run programs that call other APIs using NodeJS, I am running isolate with --share-net but I am getting DNS issue.
This program I ran to check if DNS is resolved correctly, It's working fine without isolate.
Command:
I tried to bind /etc/ so it can reach /etc/resolv.conf and /etc/hosts but it still not working.
Steps to reproduce:
./isolate --box-id=0 --init
npm install dns
Any idea what is the issue?