Public Repository

Last pushed: 2 years ago
Short Description
Provide a mount.cifs for CoreOS (for example)
Full Description

Build & Package mount.cifs with Dockerception

Provide a mount.cifs for CoreOS (for example) to use, optimized for size.

mount.cifs homepage

more tips on using mount.cifs with docker

this image is a fork from sigma/mount.cifs_copy

Delivering mount.cifs to a docker host:

docker run -it --rm -v /opt/bin/:/target so0k/mount.cifs_copy /target

Source on github

Usage running CoreOS on Hyper-V:

Hyper-V does not provide guest additions as used by vagrant/boot2docker, however if a mount.cifs binary is dropped into the CoreOS VM (i.e. in /opt/bin/) - similar transparency can be obtained:

demo (from a windows host, using CoreOS VM as docker_host):

PoC "installation" script:

Expects windows host is sharing folder as prj, windows host ip = and mounts this as /mnt/win/.



#/opt/bin will automatically be created and is included in $PATH
#docker run --rm -v /opt/bin:/target so0k/mount.cifs-copy:6.4 /target

read -s -p "Password: " SMB_PASS
printf "\n"
printf "mounting drive to $WIN_MOUNT\n"
sudo /opt/bin/mount.cifs //$SMB_HOST/$SMB_SHARE $WIN_MOUNT -o nolock,username=$SMB_USER,pass=$SMB_PASS,iocharset=utf8

Mount on boot:

a unit file could be created to map samba shares on start up.
(I have not tested this unit file - comment please for corrections)

Description=Mount Share service

#ExecStartPre=/usr/bin/docker run --rm -v /opt/bin:/target so0k/mount.cifs_copy:6.4 /target
ExecStart=/opt/bin/mount.cifs // /mnt/win -o user=vincent,pass=password,uid=0,gid=0


Docker Pull Command

Comments (5)
2 years ago

cifs-utils 6.5 was released february 2016 and I will build new tag for it, but I wonder about ... seems cifs-utils do not require a patch for this?

2 years ago

@csatfjpacheco - thx for pointing that out :o

2 years ago

Typo in unit file: so0k/mount.cifs_copy:6.4

2 years ago

@rochapabloricardo - the issue you refer to on stakoverflow uses KiteMatic with Docker Machine. Docker Machine uses boot2docker ISO which is a modified Tiny Core Linux (TLC). I think there are packages you can use with boot2docker to mount shares from your windows host, if you are not using VirtualBox guest services to mount drives into your docker machine... I personally prefer not to work with TLC and I am using Hyper-V instead of VirtualBox. In short, Yes, this image can help you fix the issue you face, but only if you want to go the long way and learn to do a few things manually.

2 years ago