docker-compose.yml
version: '2'
services:
extmail_1.2:
image: extmail_1.2:centos
container_name: extmail_1.2_centos
hostname: extmail
volumes:
- ./run_basic.sh:/opt/run_basic.sh
expose:
- "25"
- "110"
- "143"
- "80"
tty: true
networks:
extnetwork:
ipv4_address: 172.21.100.2
networks:
extnetwork:
ipam:
config:
- subnet: 172.21.100.0/24
gateway: 172.21.100.1
run-basic.sh
#!/bin/bash
port=465
function daemon()
{
pro=`ps aux | grep "${1}" | grep -v grep | wc -l`
if [ $pro -lt 1 ];then
nohup $1 >/dev/null 2>&1 &
fi
}
sleep 5
daemon "/usr/local/bin/python3.6 /data/server.py $port"
while true
do
sleep 10
done
Content type
Image
Digest
Size
166.2 MB
Last updated
over 4 years ago
docker pull asheng/extmail:centos