Skip to content
/ samba Public

Containerised samba share that is easy to use

License

Notifications You must be signed in to change notification settings

chen-ky/samba

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Samba

GitHub License Container Publish

Containerised samba share that is easy to use.

podman pull ghcr.io/chen-ky/samba:latest

Running the Container

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.

Sharing the volume of another container

podman run --detach --rm --publish 8445:445 \
    --volumes-from=<container_name> \
    --volume '<volume_name>:/share' \
    ghcr.io/chen-ky/samba:latest

Sharing a local folder

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

Environment Variables

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).

About

Containerised samba share that is easy to use

Topics

Resources

License

Stars

Watchers

Forks

Packages