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

Optimize for Sysbox #61

Closed
felipecrs opened this issue Sep 5, 2022 · 4 comments · Fixed by #156
Closed

Optimize for Sysbox #61

felipecrs opened this issue Sep 5, 2022 · 4 comments · Fixed by #156

Comments

@felipecrs
Copy link
Owner

felipecrs commented Sep 5, 2022

With Sysbox, there is no need for the dind hack.

@felipecrs felipecrs changed the title Create a Sysbox variant of the image Optimize for Sysbox Mar 13, 2024
@felipecrs
Copy link
Owner Author

felipecrs commented Apr 19, 2024

Lines I can change when using Sysbox:

bash -c 'sleep 0.5s && exec dind dockerd'

- exec dind dockerd
+ exec dockerd

I can also probably remove these 2 files at initialization:

echo 'dockremap:165536:65536' | tee -a /etc/subuid
echo 'dockremap:165536:65536' | tee -a /etc/subgid

With rm -f /etc/subuid /etc/subgid on entrypoint.sh.

@felipecrs
Copy link
Owner Author

@ctalledo, I was waiting to be able to run sysbox myself to verify whether sysbox-runc would inject any environment variable to make it easy for me to detect whether the container is running with sysbox or not, but there's no extra variable.

Do you have any idea on whether this can be accomplished? (without having to mount the docker socket and inspecting the container on host for the runtime).

@ctalledo
Copy link

Hi @felipecrs,

I was waiting to be able to run sysbox myself to verify whether sysbox-runc would inject any environment variable to make it easy for me to detect whether the container is running with sysbox or not, but there's no extra variable.

Yes I think in general we avoid inserting env variables into the container because we want it to resemble a clean Linux host environment as much as possible.

One easy way to detect if the container is running with Sysbox is to look for sysboxfs in the container mounts (e.g., mount | grep sysboxfs). Would this do or do you need a more formal method?

@felipecrs
Copy link
Owner Author

That's sufficient for sure. Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants