doc
https://hub.docker.com/r/dperson/samba
docker pull dperson/samba
samba
sudo docker run -it --name samba -p 139:139 -p 445:445
-v /path/to/directory:/mount
-d dperson/samba -p
重启 服务
ip addr add 192.168.99.110/32 dev valn99
cd /free_cicdfs0/composes/esmod_samba
docker-compose up -d
使用
\\192.168.99.110
esmod
esmod_pass
docker compose restart 策略 不够灵活
/free_cicdfs0/composes/esmod_samba
docker-compose up -d
#
while [ "$(ip a | grep -o 192.168.99.110)" = "" ] ;do echo "wating for vip"; sleep 1s;done
cat > /usr/lib/systemd/system/esmod-samba.service << 'EOF'
[Unit]
Description=esmod-samba
After=docker.service
Wants=docker.service
[Service]
WorkingDirectory=/free_cicdfs0/composes/esmod_samba
ExecStartPre=/bin/bash -c 'docker-compose down; docker-compose up -d keepalived-110;while [ "$(ip a | grep -o 192.168.99.110)" = "" ] ;do echo "wating for vip"; sleep 1s;done'
ExecStart=/bin/docker-compose up
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill $MAINPID
RestartSec=20
Restart=always
[Install]
WantedBy=multi-user.target
EOF
systemctl enable esmod-samba.service
systemctl restart esmod-samba.service
systemctl status esmod-samba.service
systemctl stop esmod-samba.service
欢迎大家一起交流呀
qq群:3638803451
vx:wxid_sgdelhiwombj12