mekayelanik/samba-server-alpine

By mekayelanik

Updated about 2 months ago

A Multi-Aarch image for lightweight, highly customizable, containerized SAMBA server

Buildkit cache
Image
Content management system
Databases & storage
15

100K+

mekayelanik/samba-server-alpine repository overview

SAMBA multi-arch image

A Multi-Aarch image for lightweight, highly customizable, containerized SAMBA server

SAMBA

This is an unofficial multi-aarch docker image of SAMBA created for multiplatform support.This image creates a local SAMBA server to ficilitate client-side data transfer. Official Website: https://www.samba.org/

Component Versions

ComponentSourceCurrent Version
SambaAlpine edge/main4.23.7-r0
Alpine Basealpine:edgeedge

The architectures supported by this image are:

ArchitectureAvailableTagStatus
x86-64amd64-<version tag>Tested "WORKING"
arm64arm64v8-<version tag>Tested "WORKING"
armhfarm32v7-<version tag>Tested "WORKING"

Version Tags

This image provides various versions that are available via tags. Please read the update information carefully and exercise caution when using "older versions" tags as they tend to contain unfixed bugs.

TagAvailableDescription
latestStable Samba release
4.23.7-r0Samba build version 4.23.7-r0

Running Image :

Here are some example snippets to help you get started creating a container.

---
version: "3.9"
services:
  samba-server-alpine:
    image: mekayelanik/samba-server-alpine:latest
    container_name: samba-server-alpine
    environment:
      - TZ=Asia/Dhaka
      - WORKGROUP=SAMBA-Server
      - SMB_PORT=445
      - TZ=Asia/Dhaka
      - NUMBER_OF_USERS=3
      - USER_NAME_1=nahid
      - USER_PASS_1=passwordnahid1
      - USER_1_UID=1001
      - USER_1_GID=1001
      - USER_NAME_2=mekayel
      - USER_PASS_2=mekayelpass2
      - USER_2_UID=1102
      - USER_2_GID=1102
      - USER_NAME_3=anik
      - USER_PASS_3=anikpass3
      - USER_3_UID=1102
      - USER_3_GID=1102
      - NUMBER_OF_SHARES=4
      - SHARE_NAME_1=SHARE_1
      - SHARE_NAME_2=AUDIO
      - SHARE_NAME_3=CCTV-Footage
      - SHARE_NAME_4=Game-Library
      - SHARE_1_GUEST_ONLY=no
      - SHARE_2_GUEST_ONLY=no
      - SHARE_3_GUEST_ONLY=yes
      - SHARE_4_GUEST_ONLY=no
      - SHARE_1_WRITE_LIST=mekayel
      - SHARE_2_WRITE_LIST=nahid
      - SHARE_3_WRITE_LIST=anik mekayel
      - SHARE_4_WRITE_LIST=nahid
      - SHARE_1_READ_ONLY=no
      - SHARE_2_READ_ONLY=no
      - SHARE_3_READ_ONLY=yes
      - SHARE_4_READ_ONLY=no
      - SHARE_1_READ_LIST=anik
      - SHARE_2_READ_LIST=mekayel anik
      - SHARE_3_READ_LIST=anik nahid
      - SHARE_4_READ_LIST=nahid
      - SHARE_1_BROWSEABLE=yes
      - SHARE_2_BROWSEABLE=yes
      - SHARE_3_BROWSEABLE=yes
      - SHARE_4_BROWSEABLE=yes
      - SHARE_1_VALID_USERS=anik
      - SHARE_2_VALID_USERS=mekayel anik
      - SHARE_3_VALID_USERS=anik nahid
      - SHARE_4_VALID_USERS=nahid
    volumes:
      - /host/path/to/share-1:/data/SHARE_1     
      - /host/path/to/AUDIO:/data/AUDIO
      - /host/path/to/CCTV-Footage:/data/CCTV-Footage
      - /host/path/to/Game-Library:/data/Game-Library
    restart: unless-stopped
Docker CLI ( click here for more info)
docker run -d \
  --name=samba-server-alpine \
      -e TZ=Asia/Dhaka \
      -e SMB_PORT=445 \
      -e WORKGROUP=SAMBA-Server \
      -e TZ=Asia/Dhaka \
      -e NUMBER_OF_USERS=3 \
      -e USER_NAME_1=user1 \
      -e USER_PASS_1=password1 \
      -e USER_1_UID=1001 \
      -e USER_1_GID=1001 \
      -e USER_NAME_2=user2 \
      -e USER_PASS_2=password2 \
      -e USER_2_UID=1102 \
      -e USER_2_GID=1102 \
      -e USER_NAME_3=user3 \
      -e USER_PASS_3=password3 \
      -e USER_3_UID=1102 \
      -e USER_3_GID=1102 \
      -e NUMBER_OF_SHARES=4 \
      -e SHARE_NAME_1=SHARE_1 \
      -e SHARE_NAME_2=SHARE_2 \
      -e SHARE_NAME_3=SHARE_3 \
      -e SHARE_NAME_4=SHARE_4 \
      -e SHARE_1_GUEST_ONLY=no \
      -e SHARE_2_GUEST_ONLY=no \
      -e SHARE_3_GUEST_ONLY=yes \
      -e SHARE_4_GUEST_ONLY=no \
      -e SHARE_1_WRITE_LIST=user1 \
      -e SHARE_2_WRITE_LIST=user2 \
      -e SHARE_3_WRITE_LIST=user1 user3 \
      -e SHARE_4_WRITE_LIST=user2 \
      -e SHARE_1_READ_ONLY=no \
      -e SHARE_2_READ_ONLY=no \
      -e SHARE_3_READ_ONLY=yes \
      -e SHARE_4_READ_ONLY=no \
      -e SHARE_1_READ_LIST=user2 \
      -e SHARE_2_READ_LIST=user1 user2 \
      -e SHARE_3_READ_LIST=user2 user3 \
      -e SHARE_4_READ_LIST=user1 \
      -e SHARE_1_BROWSEABLE=yes \
      -e SHARE_2_BROWSEABLE=yes \
      -e SHARE_3_BROWSEABLE=yes \
      -e SHARE_4_BROWSEABLE=yes \
      -e SHARE_1_VALID_USERS=user1 \
      -e SHARE_2_VALID_USERS=user2 user1 \
      -e SHARE_3_VALID_USERS=user3 user2 \
      -e SHARE_4_VALID_USERS=user1 \
      -v /host/path/to/SAHRE_1:/data/SHARE_1 \
      -v /host/path/to/SHARE_2:/data/SAHRE_2 \
      -v /host/path/to/SAHRE_3:/data/SAHRE_3 \
      -v /host/path/to/SAHRE_4:/data/SAHRE_4
  --restart unless-stopped \
  mekayelanik/samba-server-alpine:latest
If anyone wishes to give dedicated Local IP to SAMBA container using MACVLAN ( click here for more info)
---
version: "3.9"
services:
  samba-server-alpine:
    image: mekayelanik/samba-server-alpine:latest
    container_name: samba-server-alpine
    environment:
      - TZ=Asia/Dhaka
      - WORKGROUP=SAMBA-Server
      - TZ=Asia/Dhaka
      - SMB_PORT=445
      - NUMBER_OF_USERS=3
      - USER_NAME_1=nahid
      - USER_PASS_1=passwordnahid1
      - USER_1_UID=1001
      - USER_1_GID=1001
      - USER_NAME_2=mekayel
      - USER_PASS_2=mekayelpass2
      - USER_2_UID=1102
      - USER_2_GID=1102
      - USER_NAME_3=anik
      - USER_PASS_3=anikpass3
      - USER_3_UID=1102
      - USER_3_GID=1102
      - NUMBER_OF_SHARES=4
      - SHARE_NAME_1=SHARE_1
      - SHARE_NAME_2=AUDIO
      - SHARE_NAME_3=CCTV-Footage
      - SHARE_NAME_4=Game-Library
      - SHARE_1_GUEST_ONLY=no
      - SHARE_2_GUEST_ONLY=no
      - SHARE_3_GUEST_ONLY=yes
      - SHARE_4_GUEST_ONLY=no
      - SHARE_1_WRITE_LIST=mekayel
      - SHARE_2_WRITE_LIST=nahid
      - SHARE_3_WRITE_LIST=anik mekayel
      - SHARE_4_WRITE_LIST=nahid
      - SHARE_1_READ_ONLY=no
      - SHARE_2_READ_ONLY=no
      - SHARE_3_READ_ONLY=yes
      - SHARE_4_READ_ONLY=no
      - SHARE_1_READ_LIST=anik
      - SHARE_2_READ_LIST=mekayel anik
      - SHARE_3_READ_LIST=anik nahid
      - SHARE_4_READ_LIST=nahid
      - SHARE_1_BROWSEABLE=yes
      - SHARE_2_BROWSEABLE=yes
      - SHARE_3_BROWSEABLE=yes
      - SHARE_4_BROWSEABLE=yes
      - SHARE_1_VALID_USERS=anik
      - SHARE_2_VALID_USERS=mekayel anik
      - SHARE_3_VALID_USERS=anik nahid
      - SHARE_4_VALID_USERS=nahid
    volumes:
      - /host/path/to/share-1:/data/SHARE_1     
      - /host/path/to/AUDIO:/data/AUDIO
      - /host/path/to/CCTV-Footage:/data/CCTV-Footage
      - /host/path/to/Game-Library:/data/Game-Library
    restart: unless-stopped
        hostname: samba-server
    domainname: local
    mac_address: 54-64-34-24-14-04
    networks:
      macvlan-1:
        ipv4_address: 192.168.1.45
#### Network Defination ####
networks:
  macvlan-1:
    name: macvlan-1
    external: True
    driver: macvlan
    driver_opts:
      parent: eth0
    ipam:
      config:
        - subnet: "192.168.1.0/24"
          ip_range: "192.168.1.2/24"
          gateway: "192.168.1.1"

Updating Info

Below are the instructions for updating containers:

  • Update all images: docker compose pull
    • or update a single image: docker compose pull mekayelanik/samba-server-alpine
  • Let compose update all containers as necessary: docker compose up -d
    • or update a single container (recommended): docker compose up -d samba-server-alpine
  • To remove the old unused images run: docker image prune
Via Docker Run
  • Update the image: docker pull mekayelanik/samba-server-alpine:latest
  • Stop the running container: docker stop samba-server-alpine
  • Delete the container: docker rm samba-server-alpine
  • Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your /AgentDVR/Media/XML folder and settings will be preserved)
  • To remove the old unused images run: docker image prune
Via Watchtower auto-updater (only use if you don't remember the original parameters)
  • Pull the latest image at its tag and replace it with the same env variables in one run:

    docker run --rm \
    -v /var/run/docker.sock:/var/run/docker.sock \
    containrrr/watchtower\
    --run-once samba-server-alpine
  • To remove the old unused images run: docker image prune

Note: You can use Watchtower as a solution to automated updates of existing Docker containers. But it is discouraged to use automated updates. However, this is a useful tool for one-time manual updates of containers where you have forgotten the original parameters. In the long term, it is recommend to use Docker Compose.

Image Update Notifications - Diun (Docker Image Update Notifier)
  • You can also use Diun for update notifications. Other tools that automatically update containers unattended are not encouraged

Issues & Requests

To submit this Docker image specific issues or requests visit this docker image's Github Link: https://github.com/MekayelAnik/samba-server-alpine

For SAMBA related issues and requests, please visit: https://github.com/samba-team/samba

Tag summary

Content type

Image

Digest

sha256:92f35c831

Size

25.6 MB

Last updated

about 2 months ago

docker pull mekayelanik/samba-server-alpine