{"id":21531507,"url":"https://github.com/aguslr/docker-samba","last_synced_at":"2026-05-13T23:37:49.008Z","repository":{"id":190608747,"uuid":"633906540","full_name":"aguslr/docker-samba","owner":"aguslr","description":"Set up a Samba server to share files over the network","archived":false,"fork":false,"pushed_at":"2025-08-13T12:44:03.000Z","size":69,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-19T13:38:11.966Z","etag":null,"topics":["cifs","docker","podman","samba","smb"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aguslr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-04-28T14:54:24.000Z","updated_at":"2025-08-13T12:44:07.000Z","dependencies_parsed_at":"2024-02-01T18:28:39.121Z","dependency_job_id":"aeead2ee-69ce-4fdb-bd34-39fc820e7640","html_url":"https://github.com/aguslr/docker-samba","commit_stats":null,"previous_names":["aguslr/docker-samba"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aguslr/docker-samba","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aguslr%2Fdocker-samba","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aguslr%2Fdocker-samba/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aguslr%2Fdocker-samba/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aguslr%2Fdocker-samba/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aguslr","download_url":"https://codeload.github.com/aguslr/docker-samba/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aguslr%2Fdocker-samba/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33004692,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"ssl_error","status_checked_at":"2026-05-13T13:14:51.610Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cifs","docker","podman","samba","smb"],"created_at":"2024-11-24T02:14:36.395Z","updated_at":"2026-05-13T23:37:48.979Z","avatar_url":"https://github.com/aguslr.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"[aguslr/docker-samba][1]\n========================\n\n[![docker-pulls](https://img.shields.io/docker/pulls/aguslr/samba)](https://hub.docker.com/r/aguslr/samba) [![image-size](https://img.shields.io/docker/image-size/aguslr/samba/latest)](https://hub.docker.com/r/aguslr/samba)\n\n\nThis *Docker* image sets up *Samba* inside a docker container.\n\n\u003e **[Samba][2]** is a free software re-implementation of the SMB networking\n\u003e protocol.\n\n\nInstallation\n------------\n\nTo use *docker-samba*, follow these steps:\n\n1. Clone and start the container:\n\n       docker run -p 445:445 \\\n         -e SAMBA_USER=bob \\\n         -e SAMBA_PASS=123456 \\\n         -v \"${PWD}\"/home:/home \\\n         docker.io/aguslr/samba:latest\n\n2. Configure your *Samba* client software to connect to your *Samba* server's IP\n   address with user `SAMBA_USER`.\n\n\n### Variables\n\nThe image is configured using environment variables passed at runtime. All these\nvariables are prefixed by `SAMBA_`.\n\n| Variable     | Function               | Default       | Required |\n| :----------- | :--------------------- | :------------ | -------- |\n| `USER`       | Username of Samba user | `smbuser`     | N        |\n| `PASS`       | Password of Samba user | autogenerated | N        |\n| `UID`        | UID of Samba user      | 11000         | N        |\n| `PASSWDFILE` | Valid `smbpasswd` file | empty         | N        |\n| `USERSFILE`  | File with user list    | empty         | N        |\n\n\n### Adding users\n\nA default user is created with username `smbuser` (or the value of `SAMBA_USER`)\nand an autogenerated password if none is provided with the variable\n`SAMBA_PASS`. To see the autogenerated password, check the log for the\ncontainer:\n\n    docker logs \u003ccontainer_name\u003e | grep '^Password'\n\n\n#### Importing `smbpasswd` file\n\nAlternatively, if a [valid `smbpasswd`][3] file is provided, its users will be\nadded to the system and it will be imported using [`pdbedit`][4]. The same tool\ncan be used to export the file from a working Samba setup:\n\n    pdbedit -e smbpasswd:/tmp/smbpasswd\n\n\n#### Parsing user file\n\nA third option that provides finer control is provided. Using the variable\n`SAMBA_USERSFILE`, the path to a file with users' information can be passed to\nthe container.\n\nThis file should have one user per line in the format `UID:NAME:GROUP:NTHASH`.\nFor example:\n\n    1000:smbuser:users:32ED87BDB5FDC5E9CBA88547376818D4\n\nThe command tool [`mkpasswd`][5] can be used to get NT-Hashes from plain text\npasswords:\n\n    mkpasswd --method=nt 123456\n\nThis command would ouput as used in the example above:\n\n    $3$$32ed87bdb5fdc5e9cba88547376818d4\n\n\n### Custom `smb.conf`\n\nTo configure additional shares or parameters, we can add these to a `smb.conf`\nfile:\n\n    [Data]\n      path = /data\n      comment = Data directory\n      available = yes\n      browseable = yes\n      read only = yes\n      valid users = @users @nogroup\n      write list = @users\n\nThen, we can go ahead and mount it as follows:\n\n    docker run -p 445:445 \\\n      -e SAMBA_PASSWDFILE=/tmp/smbpasswd \\\n      -v \"${PWD}\"/smbpasswd:/tmp/smbpasswd \\\n      -v \"${PWD}\"/data:/data \\\n      -v \"${PWD}\"/home:/home \\\n      -v \"${PWD}\"/smb.conf:/etc/samba/includes.conf \\\n      docker.io/aguslr/samba:latest\n\n\nBuild locally\n-------------\n\nInstead of pulling the image from a remote repository, you can build it locally:\n\n1. Clone the repository:\n\n       git clone https://github.com/aguslr/docker-samba.git\n\n2. Change into the newly created directory and use `docker-compose` to build and\n   launch the container:\n\n       cd docker-samba \u0026\u0026 docker-compose up --build -d\n\n\n[1]: https://github.com/aguslr/docker-samba\n[2]: https://www.samba.org/\n[3]: https://www.samba.org/samba/docs/current/man-html/smbpasswd.5.html\n[4]: https://www.samba.org/samba/docs/current/man-html/pdbedit.8.html\n[5]: https://www.mkpasswd.net/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faguslr%2Fdocker-samba","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faguslr%2Fdocker-samba","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faguslr%2Fdocker-samba/lists"}