I chose to use this method → https://alexlubbock.com/convert-samba-docker as it uses the standard smb.conf which I already had and I prefer to use this method regardless. My main reason is documentation online will be in relating to editing SMB.CONF and I don't want to have to pass everytrhing through weird "envirvonment" variables and have to figure it all out again. It was as easy as coping my existing data over and firing up this container. This was the first container I deployed which doesn't have an "image" tag, but it's still fairly simple, it just comes with a "DOCKERFILE" which builds the image.
You can view the file here → https://raw.githubusercontent.com/alubbock/samba-docker/master/Dockerfile and see how simple it is.
Update: Due to the extra volumes and my realize how simple it is, I have created my own DockerFile based on his and now use that.
- I don't expose /etc/shadow|passwd since I only use IP range permissions w/o PWD (home network)
- All my shares are served under /mnt so I simply exposed that to the docker-container and voila, it all worked
- Even after doing systemctl disable/stop samba I still had services (nmdb) using port 138. I had to use "netstat tulpn | grep 138" and kill them manually. Once this container was running I purged samba, enabled docker-container service at boot and reboot. Everything works as expected
- There are a bunch of volumes created by this image that were not in the documentation which I mapped below as I prefer to use bind mounts in the same directory for persistence. (And my OCD, I have no "volumes" managed by docker, just bind mounts)