jan-di / scan-to-smb1

Docker container to proxy a modern smb server for legacy scanner devices
MIT License
8 stars 12 forks source link
cifs docker mfp scanner smb

Scan-to-SMB1

This container is used to proxy an existing secure smb share (version 2+) to allow legacy scanning devices, that only support cifs/smb v1 the access to a specific share or folder on the secure share - without downgrading the complete server to smb v1. Its designed to forward all files to the secure share, without overwriting files on the destination

Usage

Example docker-compose configuration:

version: '3.7'

services:
  smb1proxy:
    image: jandi/scan-to-smb1
    environment:
      TZ: 'Europe/Berlin'
      USERID: 1000
      GROUPID: 1000
      SAMBA_USERNAME: scanuser
      SAMBA_PASSWORD: secret1
      PROXY1_ENABLE: 1
      PROXY1_SHARE_NAME: scanshare10
      PROXY1_REMOTE_PATH: //secure-host/share/path/to/folder
      PROXY1_REMOTE_DOMAIN: DOM
      PROXY1_REMOTE_USERNAME: UserA
      PROXY1_REMOTE_PASSWORD: password
      PROXY2_ENABLE: 1
      PROXY2_SHARE_NAME: scanshare30
      PROXY2_REMOTE_PATH: //other-host/share
      PROXY2_REMOTE_DOMAIN: DOM
      PROXY2_REMOTE_USERNAME: UserB
      PROXY2_REMOTE_PASSWORD: password
    ports:
      - "445:445/tcp"
    tmpfs:
      - /tmp
    restart: unless-stopped
    stdin_open: true
    tty: true
    privileged: true

Config

The configuration is done via environment variables:

You can substitute x with an incremented number starting at 1 to create multiple entries. See example configuration.