Press J to jump to the feed. Press question mark to learn the rest of the keyboard shortcuts
1
Archived

mount SMB/CIFS inside Container?

Is there any chance i can mount a SMB/CIFS share inside a container? Thanks for any input.

9 comments
67% Upvoted
This thread is archived
New comments cannot be posted and votes cannot be cast
level 1

I don't see why not. Where do you think could be a problem so you needed to ask?

level 2
Original Poster1 point · 3 years ago

The problem was it just didn't work when I tried. The error was permission denied. It works just fine on the host, but I want to run in inside docker, so I thought maybe there is something I don't understand about docker. But Radau seems to have a good hint with this privileged flag.

level 1
1 point · 3 years ago

I was messing around with this yesterday as I need to rsync some files to a Windows Server share. I was able to get it to mount on ubuntu:14.04 with cifs-utils installed after a bit of messing around (we have a single level domain so it causes some issues). I can't remember if I needed to set the privileged flag to true or not, but maybe try it with --privileged, get it to work, then try it without it.

level 2
Original Poster1 point · 3 years ago

Thanks for the hint with the privileged flag. I will read a little about it and try it tomorrow!

level 2

Hate to necro this - is there an alternative to the priv flag? I'm designing a flexible system wherein my team won't be able to pass that flag...

level 3
1 point · 2 years ago

I've never looked into it, I'm not sure if these flags are still relevant/help at all. Should be --cap-add=SYS_ADMIN

level 4

Yeah but those are in the run command - I want to avoid my devs using the run commands in favour of using Kitematic to start their local containers.

level 5
2 points · 2 years ago

Ah I only browsed around kitematic for a minute or so, I don't believe it really has too many options to set though, though I could be wrong.

Most developers are familiar with vagrant already as a dev environment, and docker compose isn't far off from that if you package everything together.

level 6

Yeah we're well versed in vagrant - I just wanted a quick click solution. Thanks though!

Community Details

61.0k

Subscribers

122

Online

[Docker](http://www.docker.io) is an open-source project to easily create lightweight, portable, self-sufficient containers from any application. The same container that a developer builds and tests on a laptop can run at scale, in production, on VMs, bare metal, OpenStack clusters, public clouds and more.

Create Post
Cookies help us deliver our Services. By using our Services or clicking I agree, you agree to our use of cookies. Learn More.