1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-30 09:16:58 +02:00
dockerfiles/samba
2016-03-06 18:03:46 +08:00
..
docker-compose.yml use relative local path for volumes 2015-09-02 11:52:53 +08:00
Dockerfile update samba 2016-03-06 18:03:46 +08:00
README.md update samba 2016-03-06 18:03:46 +08:00
smb.conf update 2015-07-17 23:51:32 +08:00

samba

Samba is the standard Windows interoperability suite of programs for Linux and Unix.

docker-compose.yml

samba:
  image: vimagick/samba
  ports:
    - "137:137/udp"
    - "138:138/udp"
    - "139:139/tcp"
    - "445:445/tcp"
  volumes:
    - ./smb.conf:/etc/samba/smb.conf
    - ./share:/share
  restart: always

smb.conf

[global]
workgroup = WORKGROUP
server string = %h server (Samba, Apline)
map to guest = bad user

[share]
path = /share
browseable = yes
read only = no
guest ok = yes

server

$ cd ~/fig/samba
$ mkdir share
$ chmod 777 share
$ touch share/README.txt
$ docker-compose up -d
$ docker exec -it samba_samba_1 sh
>>> smbpasswd -a root
New SMB password:******
Retype new SMB password:******
>>> exit

client

$ smbutil view -NG smb://server
Share                                           Type    Comments
-------------------------------
share                                           Disk
IPC$                                            Pipe    IPC Service (52e5ac2d2d7c server (Samba, Apline))
2 shares listed

$ mkdir -p /Volumes/share
$ mount_smbfs //guest@server/share /Volumes/share
$ umount /Volumes/share