Containerised samba share that is easy to use.
podman pull ghcr.io/chen-ky/samba:latest
The examples here publishes the port to 8445. You can inspect the container output (for example, to get the randomly generated password) with podman logs <container_name>
.
You can access the share at smb://localhost:8445/share/
. Replace the domain/IP and port according to your setup.
podman run --detach --rm --publish 8445:445 \
--volumes-from=<container_name> \
--volume '<volume_name>:/share' \
ghcr.io/chen-ky/samba:latest
podman run --detach --rm --publish 8445:445 \
--volume '<local_directory>:/share:z' \
--env "UID=$(id -u)" \
--userns=keep-id:uid=$(id -u),gid=$(id -g) \
--user root \
ghcr.io/chen-ky/samba:latest
Name | Default Value | Description |
---|---|---|
CONFIG_PATH |
/etc/samba/container-default.conf |
The path of the configuration file in the container to use. |
UID |
1000 | The user ID of the content in the share volume. |
USERNAME |
user |
The SMB username. |
PASSWORD |
The password for the SMB user. Randomly generated and printed to stdout on runtime if not provided. | |
ALLOW_HOSTS |
A list of hosts to allow, separated by space. Please see smb.conf (5) manpage and host_access (5) manpage for accepted values. Allows hosts in the private IP range by default. | |
DENY_HOSTS |
A list of hosts to deny, separated by space. Please see smb.conf (5) manpage and host_access (5) manpage for accepted values. Deny any hosts not specified by ALLOW_HOSTS by default (0.0.0.0/0 and ::/0 ). |