samba
Create the first docker-compose.yml
file
su - cloud
Switch to bash
as shell
bash
Create a docker folder
mkdir /home/cloud/docker
Open the docker file
vim /home/cloud/docker/docker-compose.yml
docker-compose.yml
This is a basic samba configuration that you can use to acces your shared volumes via smb protocol
version: '3.7'
services:
samba:
image: dperson/samba
environment:
- TZ=${TZ}
- WORKGROUP=WORKGROUP
- USER=${U01_CLEAR};${P01_CLEAR}
- USERID=${PUID}
- GROUPID=${PGID}
networks:
- default
ports:
- '137:137/udp'
- '138:138/udp'
- '139:139/tcp'
- '445:445/tcp'
read_only: true
tmpfs:
- /tmp
restart: unless-stopped
stdin_open: true
tty: true
volumes:
- samba:/mnt:z
command:
-u "${U02_CLEAR};${P02_CLEAR}"
-s "tv;/mnt/tv;no;no;no;${U02_CLEAR}"
-s "share;/mnt/share;yes;no;yes;all"
-s "data;/mnt/data;no;no;no;${U01_CLEAR}"
-p
volumes:
samba:
Start the container
Start samba with docker compose for the first time
docker-compose -up -d
cloud@itx02:~/docker$ docker-compose up -d
Creating network "docker_default" with the default driver
Creating volume "docker_samba" with default driver
Pulling samba (dperson/samba:)...
latest: Pulling from dperson/samba
89d9c30c1d48: Pull complete
7ab5ece07d0a: Pull complete
95fd3ce218b9: Pull complete
Digest: sha256:ffbca71bee5396195df4987acd87dca4fbb66906a9888783193fe57ca9854acc
Status: Downloaded newer image for dperson/samba:latest
Creating docker_samba_1 ... done
cloud@itx02:~/docker$ docker-compose ps
Name Command State Ports
----------------------------------------------------------------------------------------------------------------------------------------------------------------
docker_samba_1 /sbin/tini -- /usr/bin/sam ... Up (health: starting) 0.0.0.0:137->137/udp, 0.0.0.0:138->138/udp, 0.0.0.0:139->139/tcp, 0.0.0.0:445->445/tcp
No Comments