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

Sudo / Python long start #99

Closed
lap1nou opened this issue May 30, 2022 · 1 comment
Closed

Sudo / Python long start #99

lap1nou opened this issue May 30, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@lap1nou
Copy link

lap1nou commented May 30, 2022

Hello,

I think I found a bug in the Docker image, I'm not sure but Python scripts that requires sudo take a long time to run, for example the brute force utility patator or the Python 3 module http.server used to spawn a fast web server.

I think the root cause is that sudo try to resolve the machine hostname (no idea why), here is a screen when I run sudo in Exegol (which is useless since we are root):
image

However If I add the hostname of my container in the /etc/hosts file:
image

All 'long' command, become instantaneous, I have no idea why patator works better with this, since it doesn't have any links with sudo, same for http.server (except if you use port below 1024 ofc). I'm sorry if you don't encounter the same bug as me, or if this bug is fixed already (I got the last version of Exegol 4.0.2), anyway the potential fix would be the add the hostname during the build of the container, here is a post talking about this: https://stackoverflow.com/questions/38302867/how-to-update-etc-hosts-file-in-docker-image-during-docker-build, a possible solution would be to use the --add-host arguments during build, but I never tested it, I could potentially try to work on the problem if other people have the same issue as me.

(Now that I think about it, this issue is maybe more related to Exegol itself, tell me what you think)

Anyway thank you for Exegol.

@ShutdownRepo ShutdownRepo added the enhancement New feature or request label Jun 11, 2022
@Dramelac Dramelac transferred this issue from ThePorgs/Exegol-images Jun 22, 2022
@Dramelac
Copy link
Member

Adding exegol hostname dynamically to /etc/hosts as extra-host via python wrapper
Changed in dev branch with commit 1304b21
Will be release with 4.0.3

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

3 participants