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

Envbuilder does not run in a sysbox container #50

Closed
janLo opened this issue Aug 16, 2023 · 1 comment
Closed

Envbuilder does not run in a sysbox container #50

janLo opened this issue Aug 16, 2023 · 1 comment
Assignees

Comments

@janLo
Copy link
Contributor

janLo commented Aug 16, 2023

Envbuilder fails if it runs using the sysbox container runtime. This is unfortunate because sysbox is neccessary to run k3s or docker within a workspace.

The issue is described already in the kaniko project: GoogleContainerTools/kaniko#2144 and the sysbox project: nestybox/sysbox#564

There are also workarounds proposed (like unmounting the offending mountpoint or mounting something empty over it). As envbuilder uses kaniko internally, but the image lacks the userland for the workarounds I think, it should also implement the workaround for convenience.

Another option is to attach an empty volume from the outside to the container, but this is difficult to implement in a terraform manifest as the target of the mountpoint is dependend on the running kernel of the host - and the provisioner does not have this information available.

janLo added a commit to janLo/envbuilder that referenced this issue Aug 16, 2023
This fixes coder#50 by temporary bind-mounting all readonly mounts within
the MagicDir to keep them out of the way for kaniko.

After kaniko finished it's build, the original mountpoints are restored
at their original location.

Signed-off-by: Jan Losinski <jan.losinski@secunet.com>
janLo added a commit to janLo/envbuilder that referenced this issue Aug 16, 2023
This fixes coder#50 by temporary bind-mounting all readonly mounts within
the MagicDir to keep them out of the way for kaniko.

After kaniko finished it's build, the original mountpoints are restored
at their original location.

Signed-off-by: Jan Losinski <losinskij@gmail.com>
janLo added a commit to janLo/envbuilder that referenced this issue Aug 16, 2023
This fixes coder#50 by temporary bind-mounting all readonly mounts within
the MagicDir to keep them out of the way for kaniko.

After kaniko finished it's build, the original mountpoints are restored
at their original location.

Signed-off-by: Jan Losinski <losinskij@gmail.com>
janLo added a commit to janLo/envbuilder that referenced this issue Aug 17, 2023
This fixes coder#50 by temporary bind-mounting all readonly mounts within
the MagicDir to keep them out of the way for kaniko.

After kaniko finished it's build, the original mountpoints are restored
at their original location.

Signed-off-by: Jan Losinski <losinskij@gmail.com>
@bpmct bpmct added this to the envbuilder v1.0 milestone Apr 10, 2024
@johnstcn johnstcn self-assigned this May 13, 2024
@johnstcn
Copy link
Member

Fixed by #183 and #51

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.

3 participants