{"id":13548187,"url":"https://github.com/crazy-max/docker-samba","last_synced_at":"2025-05-15T15:07:06.364Z","repository":{"id":37086671,"uuid":"371908068","full_name":"crazy-max/docker-samba","owner":"crazy-max","description":"Samba Docker image","archived":false,"fork":false,"pushed_at":"2025-03-28T00:05:39.000Z","size":139,"stargazers_count":527,"open_issues_count":25,"forks_count":53,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-07T21:11:15.446Z","etag":null,"topics":["alpine-linux","docker","samba","samba-server","samba4"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crazy-max.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"crazy-max","custom":"https://www.paypal.me/crazyws"}},"created_at":"2021-05-29T07:24:41.000Z","updated_at":"2025-04-07T15:33:37.000Z","dependencies_parsed_at":"2023-10-01T23:28:30.228Z","dependency_job_id":"77981438-4792-4c37-90d4-b35431525ad1","html_url":"https://github.com/crazy-max/docker-samba","commit_stats":{"total_commits":97,"total_committers":10,"mean_commits":9.7,"dds":"0.24742268041237114","last_synced_commit":"0bf09939b3dc7cc6dd3c3ae277584a98da458036"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazy-max%2Fdocker-samba","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazy-max%2Fdocker-samba/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazy-max%2Fdocker-samba/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazy-max%2Fdocker-samba/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crazy-max","download_url":"https://codeload.github.com/crazy-max/docker-samba/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254364270,"owners_count":22058878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alpine-linux","docker","samba","samba-server","samba4"],"created_at":"2024-08-01T12:01:06.909Z","updated_at":"2025-05-15T15:07:01.334Z","avatar_url":"https://github.com/crazy-max.png","language":"Dockerfile","readme":"\u003cp align=\"center\"\u003e\u003ca href=\"https://github.com/crazy-max/docker-samba\" target=\"_blank\"\u003e\u003cimg height=\"128\" src=\"https://raw.githubusercontent.com/crazy-max/docker-samba/master/.github/docker-samba.jpg\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://hub.docker.com/r/crazymax/samba/tags?page=1\u0026ordering=last_updated\"\u003e\u003cimg src=\"https://img.shields.io/github/v/tag/crazy-max/docker-samba?label=version\u0026style=flat-square\" alt=\"Latest Version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/crazy-max/docker-samba/actions?workflow=build\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/crazy-max/docker-samba/build.yml?branch=master\u0026label=build\u0026logo=github\u0026style=flat-square\" alt=\"Build Status\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://hub.docker.com/r/crazymax/samba/\"\u003e\u003cimg src=\"https://img.shields.io/docker/stars/crazymax/samba.svg?style=flat-square\u0026logo=docker\" alt=\"Docker Stars\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://hub.docker.com/r/crazymax/samba/\"\u003e\u003cimg src=\"https://img.shields.io/docker/pulls/crazymax/samba.svg?style=flat-square\u0026logo=docker\" alt=\"Docker Pulls\"\u003e\u003c/a\u003e\n  \u003cbr /\u003e\u003ca href=\"https://github.com/sponsors/crazy-max\"\u003e\u003cimg src=\"https://img.shields.io/badge/sponsor-crazy--max-181717.svg?logo=github\u0026style=flat-square\" alt=\"Become a sponsor\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.paypal.me/crazyws\"\u003e\u003cimg src=\"https://img.shields.io/badge/donate-paypal-00457c.svg?logo=paypal\u0026style=flat-square\" alt=\"Donate Paypal\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## About\n\n[Samba](https://wiki.samba.org) Docker image.\n\n\u003e [!TIP] \n\u003e Want to be notified of new releases? Check out 🔔 [Diun (Docker Image Update Notifier)](https://github.com/crazy-max/diun)\n\u003e project!\n\n___\n\n* [Features](#features)\n* [Build locally](#build-locally)\n* [Image](#image)\n* [Environment variables](#environment-variables)\n* [Volumes](#volumes)\n* [Ports](#ports)\n* [Configuration](#configuration)\n  * [`veto`](#veto)\n  * [`hidefiles`](#hidefiles)\n  * [`recycle`](#recycle)\n* [Usage](#usage)\n  * [Docker Compose](#docker-compose)\n  * [Command line](#command-line)\n* [Notes](#notes)\n  * [Variable interpolation](#variable-interpolation)\n  * [Status](#status)\n  * [Service discovery for Windows](#service-discovery-for-windows)\n* [Upgrade](#upgrade)\n* [Contributing](#contributing)\n* [License](#license)\n\n## Features\n\n* Multi-platform image\n* Easy [configuration](#configuration) through YAML\n* Improve [operability with Mac OS X clients](https://wiki.samba.org/index.php/Configure_Samba_to_Work_Better_with_Mac_OS_X)\n* Drop support for legacy protocols including NetBIOS, WINS, and Samba port 139\n* [Service discovery for Windows](#service-discovery-for-windows) supported using [WSDD2](https://github.com/Netgear/wsdd2)\n\n## Build locally\n\n```shell\ngit clone https://github.com/crazy-max/docker-samba.git\ncd docker-samba\n\n# Build image and output to docker (default)\ndocker buildx bake\n\n# Build multi-platform image\ndocker buildx bake image-all\n```\n\n## Image\n\n| Registry                                                                                         | Image                           |\n|--------------------------------------------------------------------------------------------------|---------------------------------|\n| [Docker Hub](https://hub.docker.com/r/crazymax/samba/)                                           | `crazymax/samba`                |\n| [GitHub Container Registry](https://github.com/users/crazy-max/packages/container/package/samba) | `ghcr.io/crazy-max/samba`       |\n\nFollowing platforms for this image are available:\n\n```\n$ docker buildx imagetools inspect crazymax/samba --format \"{{json .Manifest}}\" | \\\n  jq -r '.manifests[] | select(.platform.os != null and .platform.os != \"unknown\") | .platform | \"\\(.os)/\\(.architecture)\\(if .variant then \"/\" + .variant else \"\" end)\"'\n\nlinux/386\nlinux/amd64\nlinux/arm/v6\nlinux/arm/v7\nlinux/arm64\nlinux/ppc64le\nlinux/riscv64\nlinux/s390x\n```\n\n## Environment variables\n\n* `TZ`: Timezone assigned to the container (default `UTC`)\n* `CONFIG_FILE`: YAML configuration path (default `/data/config.yml`)\n* `SAMBA_WORKGROUP`: NT-Domain-Name or [Workgroup-Name](https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#WORKGROUP). (default `WORKGROUP`)\n* `SAMBA_SERVER_STRING`: [Server string](https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#SERVERSTRING) is the equivalent of the NT Description field. (default `Docker Samba Server`)\n* `SAMBA_LOG_LEVEL`: [Log level](https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#LOGLEVEL). (default `0`)\n* `SAMBA_FOLLOW_SYMLINKS`: Allow to [follow symlinks](https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#FOLLOWSYMLINKS). (default `yes`)\n* `SAMBA_WIDE_LINKS`: Controls whether or not links in the UNIX file system may be followed by the server. (default `yes`)\n* `SAMBA_HOSTS_ALLOW`: Set of hosts which are permitted to access a service. (default `127.0.0.0/8 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16`)\n* `SAMBA_INTERFACES`: Allows you to override the default network interfaces list.\n* `WSDD2_ENABLE`: Enable [service discovery for Windows](#service-discovery-for-windows) (default `0`)\n* `WSDD2_HOSTNAME`: Override hostname (default to host or container name)\n* `WSDD2_NETBIOS_NAME`: Set NetBIOS name (default to hostname)\n* `WSDD2_INTERFACE`: Reply only on this interface\n\n\u003e More info: https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html\n\n## Volumes\n\n* `/data`: Contains cache, configuration and runtime data\n\n## Ports\n\n* `445`: SMB over TCP port\n* `3702`: WS-Discovery TCP/UDP port\n* `5355`: LLMNR TCP/UDP port\n\n\u003e More info: https://wiki.samba.org/index.php/Samba_NT4_PDC_Port_Usage\n\n## Configuration\n\nBefore using this image you have to create the YAML configuration file\n`/data/config.yml` to be able to create users, provide global options and add\nshares. Here is an example:\n\n```yaml\nauth:\n  - user: foo\n    group: foo\n    uid: 1000\n    gid: 1000\n    password: bar\n  - user: baz\n    group: xxx\n    uid: 1100\n    gid: 1200\n    password_file: /run/secrets/baz_password\n\nglobal:\n  - \"force user = foo\"\n  - \"force group = foo\"\n\nshare:\n  - name: foo\n    path: /samba/foo\n    browsable: yes\n    readonly: no\n    guestok: no\n    validusers: foo\n    writelist: foo\n    veto: no\n    hidefiles: /_*/\n    recycle: yes\n```\n\nA more complete `config.yml` example is available [here](examples/compose/data/config.yml).\n\n### `veto`\n\n`veto: no` is a list of predefined files and directories that will not be\nvisible or accessible:\n\n```\n/._*/.apdisk/.AppleDouble/.DS_Store/.TemporaryItems/.Trashes/desktop.ini/ehthumbs.db/Network Trash Folder/Temporary Items/Thumbs.db/\n```\n\n\u003e More info: https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#VETOFILES\n\n### `hidefiles`\n\n`hidefiles: /_*/` is a list of predefined files and directories that will not be visible, but are accessible:\n\n```\n/_*/\n```\n\nIn this example, all files and directories beginning with an underscore (`_`) will be hidden.\n\n\u003e More info: https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#HIDEFILES\n\n### `recycle`\n\n`recycle: yes` this option enables `vfs_recycle` module.\nThe `vfs_recycle` intercepts file deletion requests and moves the affected files to a temporary repository rather than deleting them immediately. This gives the same effect as the Recycle Bin on Windows computers.\n\n\u003e More info: https://www.samba.org/samba/docs/current/man-html/vfs_recycle.8.html\n\n## Usage\n\n### Docker Compose\n\nDocker compose is the recommended way to run this image. Copy the content of folder [examples/compose](examples/compose)\nin `/var/samba/` on your host for example. Edit the compose and configuration files with your preferences and run the\nfollowing commands:\n\n```bash\ndocker compose up -d\ndocker compose logs -f\n```\n\n### Command line\n\nYou can also use the following minimal command:\n\n```shell\ndocker run -d --network host \\\n  -v \"$(pwd)/data:/data\" \\\n  --name samba crazymax/samba\n```\n\n## Upgrade\n\nRecreate the container whenever I push an update:\n\n```bash\ndocker compose pull\ndocker compose up -d\n```\n\n## Notes\n\n### Variable interpolation\n\nValues in a YAML file can be set by variables, and interpolated at runtime using\na Bash-like syntax `${VARIABLE}`.\n\nDefault values can be defined inline using typical shell syntax `${VARIABLE-default}`.\nIt evaluates to default only if `VARIABLE` is unset in the environment.\n\nHere is an example:\n\n```yaml\nauth:\n  - user: foo\n    group: foo\n    uid: 1000\n    gid: 1000\n    password: bar\n\nshare:\n  - name: foo\n    path: /samba/foo\n    browsable: ${BROWSABLE-no}\n    readonly: no\n    guestok: no\n    validusers: foo\n    writelist: foo\n```\n\n```yaml\nservices:\n  samba:\n    image: crazymax/samba\n    network_mode: host\n    volumes:\n      - \"./data:/data\"\n      - \"./foo:/samba/foo\"\n    environment:\n      - \"BROWSABLE=yes\"\n    restart: always\n```\n\n### Status\n\nUse the following commands to check the logs and status:\n\n```shell\ndocker compose logs samba\ndocker compose exec samba smbstatus\n```\n\n### Service discovery for Windows\n\nService discovery for Windows can be enabled by setting `WSDD2_ENABLE` to `1`.\n\nYou also need to set the following capabilities to the container:\n* `CAP_NET_ADMIN`\n* `CAP_NET_RAW`\n\nName will be the `hostname` of the host if network mode is `host` or one of\nthe container. If you want to override this value, you can set `hostname` in\nyour compose file or set `WSDD2_HOSTNAME` env var.\n\nNetBIOS name will be the `hostname` of the host. If you want to override this\nvalue, you can set `WSDD2_NETBIOS_NAME` env var.\n\nSee [examples/windows](examples/windows) as an example.\n\n## Contributing\n\nWant to contribute? Awesome! The most basic way to show your support is to star\nthe project, or to raise issues. You can also support this project by [**becoming a sponsor on GitHub**](https://github.com/sponsors/crazy-max)\nor by making a [PayPal donation](https://www.paypal.me/crazyws) to ensure this\njourney continues indefinitely!\n\nThanks again for your support, it is much appreciated! :pray:\n\n## License\n\nMIT. See `LICENSE` for more details.\n","funding_links":["https://github.com/sponsors/crazy-max","https://www.paypal.me/crazyws"],"categories":["HarmonyOS","Dockerfile"],"sub_categories":["Windows Manager"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazy-max%2Fdocker-samba","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrazy-max%2Fdocker-samba","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazy-max%2Fdocker-samba/lists"}