I’m running a dockurr/samba Docker container on my Apple M2 Pro machine. I can successfully access the Samba share from the host machine (using Finder/Connect to Server), but I’m unable to connect to it from other devices on the same local network (e.g., another computer, Android TV).
Here’s my Docker Compose configuration:
samba:
image: dockurr/samba
container_name: samba
hostname: samba
environment:
NAME: ${SAMBA_NAME}
USER: ${SAMBA_USER}
PASS: ${SAMBA_PASS}
ports:
- ${SAMBA_PORT_445}:445
volumes:
- ${PATH_TO_MEDIA_FOLDER}:/storage
I’ve tried the following troubleshooting steps:
Verified firewall rules: Ensured that the firewall on my host machine allows incoming connections on port 445.
Restarted services: Restarted Docker and the Samba service within the container.
Checked network connectivity: Confirmed that both the host machine and the other devices are on the same network.
I would greatly appreciate any assistance in resolving this connection issue.
You need to expose the relevant ports on the host IP. You can do that using the -p switch to docker run.
For example:
docker run -p 445:445 container
The above will map port 445 on the local host to the docker container. Make sure nothing else is listening on the same port.