2016-12-10 03:39:02 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
. mailcow.conf
|
|
|
|
|
|
|
|
NAME="sogo-mailcow"
|
|
|
|
|
|
|
|
echo "Stopping and removing containers with name tag ${NAME}..."
|
|
|
|
if [[ ! -z $(docker ps -af "name=${NAME}" -q) ]]; then
|
|
|
|
docker stop $(docker ps -af "name=${NAME}" -q)
|
|
|
|
docker rm $(docker ps -af "name=${NAME}" -q)
|
|
|
|
fi
|
|
|
|
|
|
|
|
docker run \
|
|
|
|
-v ${PWD}/data/conf/sogo/:/etc/sogo/ \
|
|
|
|
--name ${NAME} \
|
|
|
|
--network=${DOCKER_NETWORK} \
|
|
|
|
--network-alias sogo \
|
|
|
|
-h sogo \
|
2016-12-14 16:25:54 +08:00
|
|
|
-e DBNAME=${DBNAME} \
|
|
|
|
-e DBUSER=${DBUSER} \
|
|
|
|
-e DBPASS=${DBPASS} \
|
2016-12-14 05:12:54 +08:00
|
|
|
-d -t andryyy/mailcow-dockerized:sogo
|