samba: image: vimagick/samba volumes: - /var/samba/smb.conf:/etc/samba/smb.conf - /var/share/share:/share net: host tty: yes restart: always
[global] netbios name = gpu1 workgroup = WORKGROUP server string = GPU1 Samba Server server role = standalone map to guest = bad user usershare allow guests = yes [homes] comment = Home Directories browseable = no writable = yes [share] comment = Public File Sharing path = /share browseable = yes read only = no guest ok = yes admin users = root
# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 219a2826d849 vimagick/samba "/bin/sh -c 'nmbd -D…" 52 seconds ago Up 50 seconds docker_samba_samba_1 a21b429d9bb4 sonatype/nexus3 "sh -c ${SONATYPE_DI…" 8 days ago Up 53 minutes 0.0.0.0:8081->8081/tcp, :::8081->8081/tcp docker_nexus3_nexus_1 # docker exec -it docker_samba_samba_1 sh / # testparam sh: testparam: not found / # smbpasswd -a root New SMB password: Retype new SMB password: Added user root. / # exit
設定 > 詳細設定 > ファイル > ネットワークファイル共有 > ファイル共有を追加