nestybox / nestybox/sysbox

Mounting an SMB share inside a sysbox container

Open
#624 16 comments 0 reactions 1 assignee View on GitHub

@ctalledo is already working on this.

Since Jan 12, 2023.

question
Dominant language
Shell
Stars
3.9k
Forks
230
Avg merge
7h 48m
Merged PRs (30d)
3

Description

I'm tasked with giving our DevOps agents (which use sysbox so they can do "Docker IN Docker") access to our Windows network share, and I've got some issues.

a) I cannot mount the share from inside the container, as Docker itself doesn't permit that (would need to add --privileged but that seems like it defeats the purpose of using sysbox in the first place)
b) I cannot use smbclient because I'd probably need to expose the domain passwords for some kind of user to the container
c) I've tried mounting the share to the Docker host and then sharing the mounted folder, only to discover that won't work either (note that sysbox has been declared as the default runtime):

docker run -v /mnt/storage:/storage --rm -it --entrypoint bash my_devops_image
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: container_linux.go:425: starting container process caused: process_linux.go:607: container init caused: process_linux.go:578: handleReqOp caused: rootfs_init_linux.go:322: ID-map mount on storage caused: rootfs_init_linux.go:316: setting up ID-mapped mount on path /var/lib/sysbox/rootfs/660dc228a6a90bd401263902db0e1ff7da7a2cd106325d895d947bab97b6e9ff/top/merged/storage (likely means idmapped mounts are not supported on the filesystem at this path (unknown fs)) caused: Failed to set mount attr: invalid argument: unknown.

Googling this suggests that sysbox simply cannot handle such a volume. Are there any other options open to me?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.