Skip to content

bfren/docker-samba

Repository files navigation

Docker Samba

GitHub release (latest by date) Docker Pulls Docker Image Size GitHub Workflow Status

Docker Repository - bfren ecosystem

Comes with Samba pre-installed, and creates config based on a json file (see shares-conf-sample.json).

Contents

Ports

  • 445

Volumes

Volume Purpose
/files Contains the files to be shared.

Sample Files

docker-compose.yml

version: "3.8"

services:
  samba:
    image: bfren/samba:latest
    container_name: samba
    restart: unless-stopped
    ports:
      - "0.0.0.0:445:445"
    volumes:
      - ./v/shares.json:/files/shares.json:ro
      - ./v/example:/files/example
      - ./v/another:/files/another
    networks:
      - samba

networks:
  samba:
    driver: bridge
    name: samba

shares.json

{
    "$schema": "https://schemas.bfren.dev/docker/samba/shares.json",
    "users": [
        {
            "name": "fred",
            "pass": "password"
        },
        {
            "name": "jones",
            "pass": "another"
        }
    ],
    "shares": [
        {
            "name": "example",
            "comment": "Optional description of share",
            "users": [
                "fred"
            ],
            "browseable": false,
            "writeable": false
        },
        {
            "name": "another",
            "users": [
                "fred",
                "jones"
            ]
        }
    ]
}

Licence

MIT

Copyright

Copyright (c) 2022-2024 bfren (unless otherwise stated)