Uploaded images to Docker hub
parent
1910e3bc29
commit
94530fcecd
|
@ -10,24 +10,9 @@ if [[ ! -z $(docker ps -af "name=${NAME}" -q) ]]; then
|
||||||
docker rm $(docker ps -af "name=${NAME}" -q)
|
docker rm $(docker ps -af "name=${NAME}" -q)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
build() {
|
|
||||||
docker build --no-cache -t pdns data/Dockerfiles/pdns/.
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ ! -z "$(docker images -q pdns)" ]]; then
|
|
||||||
read -r -p "Found image locally. Delete local and rebuild without cache anyway? [y/N] " response
|
|
||||||
response=${response,,}
|
|
||||||
if [[ $response =~ ^(yes|y)$ ]]; then
|
|
||||||
docker rmi pdns
|
|
||||||
build
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
build
|
|
||||||
fi
|
|
||||||
|
|
||||||
docker run \
|
docker run \
|
||||||
-v ${PWD}/data/conf/pdns/:/etc/powerdns/ \
|
-v ${PWD}/data/conf/pdns/:/etc/powerdns/ \
|
||||||
--network=${DOCKER_NETWORK} \
|
--network=${DOCKER_NETWORK} \
|
||||||
-h pdns \
|
-h pdns \
|
||||||
--name ${NAME} \
|
--name ${NAME} \
|
||||||
-d pdns
|
-d andryyy/mailcow-dockerized:pdns
|
||||||
|
|
|
@ -4,10 +4,6 @@
|
||||||
|
|
||||||
NAME="rspamd-mailcow"
|
NAME="rspamd-mailcow"
|
||||||
|
|
||||||
build() {
|
|
||||||
docker build --no-cache -t rspamd data/Dockerfiles/rspamd/.
|
|
||||||
}
|
|
||||||
|
|
||||||
PDNS_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' pdns-mailcow 2> /dev/null)
|
PDNS_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' pdns-mailcow 2> /dev/null)
|
||||||
if [[ ! ${PDNS_IP} =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
if [[ ! ${PDNS_IP} =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||||
echo "Cannot determine Powerdns Recursor ip address. Is the container running?"
|
echo "Cannot determine Powerdns Recursor ip address. Is the container running?"
|
||||||
|
@ -20,17 +16,6 @@ if [[ ! -z $(docker ps -af "name=${NAME}" -q) ]]; then
|
||||||
docker rm $(docker ps -af "name=${NAME}" -q)
|
docker rm $(docker ps -af "name=${NAME}" -q)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -z "$(docker images -q rspamd)" ]]; then
|
|
||||||
read -r -p "Found image locally. Delete local and rebuild without cache anyway? [y/N] " response
|
|
||||||
response=${response,,}
|
|
||||||
if [[ $response =~ ^(yes|y)$ ]]; then
|
|
||||||
docker rmi rspamd
|
|
||||||
build
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
build
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Needs network-alias because of different dns
|
# Needs network-alias because of different dns
|
||||||
|
|
||||||
docker run \
|
docker run \
|
||||||
|
@ -45,7 +30,7 @@ docker run \
|
||||||
--network-alias=rspamd \
|
--network-alias=rspamd \
|
||||||
-h rspamd \
|
-h rspamd \
|
||||||
--name ${NAME} \
|
--name ${NAME} \
|
||||||
-d rspamd
|
-d andryyy/mailcow-dockerized:rspamd
|
||||||
|
|
||||||
/bin/bash ./fix-permissions.sh
|
/bin/bash ./fix-permissions.sh
|
||||||
|
|
||||||
|
|
|
@ -10,24 +10,9 @@ if [[ ! -z $(docker ps -af "name=${NAME}" -q) ]]; then
|
||||||
docker rm $(docker ps -af "name=${NAME}" -q)
|
docker rm $(docker ps -af "name=${NAME}" -q)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
build() {
|
|
||||||
docker build --no-cache -t rmilter data/Dockerfiles/rmilter/.
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ ! -z "$(docker images -q rmilter)" ]]; then
|
|
||||||
read -r -p "Found image locally. Delete local and rebuild without cache anyway? [y/N] " response
|
|
||||||
response=${response,,}
|
|
||||||
if [[ $response =~ ^(yes|y)$ ]]; then
|
|
||||||
docker rmi rmilter
|
|
||||||
build
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
build
|
|
||||||
fi
|
|
||||||
|
|
||||||
docker run \
|
docker run \
|
||||||
-v ${PWD}/data/conf/rmilter/:/etc/rmilter.conf.d/:ro \
|
-v ${PWD}/data/conf/rmilter/:/etc/rmilter.conf.d/:ro \
|
||||||
--network=${DOCKER_NETWORK} \
|
--network=${DOCKER_NETWORK} \
|
||||||
-h rmilter \
|
-h rmilter \
|
||||||
--name ${NAME} \
|
--name ${NAME} \
|
||||||
-d rmilter
|
-d andryyy/mailcow-dockerized:rmilter
|
||||||
|
|
|
@ -4,32 +4,12 @@ source mailcow.conf
|
||||||
|
|
||||||
NAME="dovecot-mailcow"
|
NAME="dovecot-mailcow"
|
||||||
|
|
||||||
build() {
|
|
||||||
docker build --no-cache -t dovecot:local data/Dockerfiles/dovecot/.
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ ${1} == "--reconf" ]]; then
|
|
||||||
reconf
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Stopping and removing containers with name tag ${NAME}..."
|
echo "Stopping and removing containers with name tag ${NAME}..."
|
||||||
if [[ ! -z $(docker ps -af "name=${NAME}" -q) ]]; then
|
if [[ ! -z $(docker ps -af "name=${NAME}" -q) ]]; then
|
||||||
docker stop $(docker ps -af "name=${NAME}" -q)
|
docker stop $(docker ps -af "name=${NAME}" -q)
|
||||||
docker rm $(docker ps -af "name=${NAME}" -q)
|
docker rm $(docker ps -af "name=${NAME}" -q)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -z "$(docker images -q dovecot)" ]]; then
|
|
||||||
read -r -p "Found image locally. Delete local and rebuild without cache anyway? [y/N] " response
|
|
||||||
response=${response,,}
|
|
||||||
if [[ $response =~ ^(yes|y)$ ]]; then
|
|
||||||
docker rmi dovecot:local
|
|
||||||
build
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
build
|
|
||||||
fi
|
|
||||||
|
|
||||||
sed -i "/^connect/c\connect = \"host=mysql dbname=${DBNAME} user=${DBUSER} password=${DBPASS}\"" data/conf/dovecot/sql/*
|
sed -i "/^connect/c\connect = \"host=mysql dbname=${DBNAME} user=${DBUSER} password=${DBPASS}\"" data/conf/dovecot/sql/*
|
||||||
|
|
||||||
docker run \
|
docker run \
|
||||||
|
|
|
@ -10,32 +10,12 @@ if [[ ! ${PDNS_IP} =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
build() {
|
|
||||||
docker build --no-cache -t postfix data/Dockerfiles/postfix/.
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ ${1} == "--reconf" ]]; then
|
|
||||||
reconf
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Stopping and removing containers with name tag ${NAME}..."
|
echo "Stopping and removing containers with name tag ${NAME}..."
|
||||||
if [[ ! -z $(docker ps -af "name=${NAME}" -q) ]]; then
|
if [[ ! -z $(docker ps -af "name=${NAME}" -q) ]]; then
|
||||||
docker stop $(docker ps -af "name=${NAME}" -q)
|
docker stop $(docker ps -af "name=${NAME}" -q)
|
||||||
docker rm $(docker ps -af "name=${NAME}" -q)
|
docker rm $(docker ps -af "name=${NAME}" -q)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -z "$(docker images -q postfix)" ]]; then
|
|
||||||
read -r -p "Found image locally. Delete local and rebuild without cache anyway? [y/N] " response
|
|
||||||
response=${response,,}
|
|
||||||
if [[ $response =~ ^(yes|y)$ ]]; then
|
|
||||||
docker rmi postfix
|
|
||||||
build
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
build
|
|
||||||
fi
|
|
||||||
|
|
||||||
sed -i "/^user/c\user = ${DBUSER}" data/conf/postfix/sql/*
|
sed -i "/^user/c\user = ${DBUSER}" data/conf/postfix/sql/*
|
||||||
sed -i "/^password/c\password = ${DBPASS}" data/conf/postfix/sql/*
|
sed -i "/^password/c\password = ${DBPASS}" data/conf/postfix/sql/*
|
||||||
sed -i "/^dbname/c\dbname = ${DBNAME}" data/conf/postfix/sql/*
|
sed -i "/^dbname/c\dbname = ${DBNAME}" data/conf/postfix/sql/*
|
||||||
|
@ -52,4 +32,4 @@ docker run \
|
||||||
--network=${DOCKER_NETWORK} \
|
--network=${DOCKER_NETWORK} \
|
||||||
--network-alias postfix \
|
--network-alias postfix \
|
||||||
-h ${MAILCOW_HOSTNAME} \
|
-h ${MAILCOW_HOSTNAME} \
|
||||||
-d postfix
|
-d andryyy/mailcow-dockerized:postfix
|
||||||
|
|
|
@ -10,21 +10,6 @@ if [[ ! -z $(docker ps -af "name=${NAME}" -q) ]]; then
|
||||||
docker rm $(docker ps -af "name=${NAME}" -q)
|
docker rm $(docker ps -af "name=${NAME}" -q)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
build() {
|
|
||||||
docker build --no-cache -t sogo data/Dockerfiles/sogo/.
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ ! -z "$(docker images -q sogo)" ]]; then
|
|
||||||
read -r -p "Found image locally. Delete local and rebuild without cache anyway? [y/N] " response
|
|
||||||
response=${response,,} # tolower
|
|
||||||
if [[ $response =~ ^(yes|y)$ ]]; then
|
|
||||||
docker rmi sogo
|
|
||||||
build
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
build
|
|
||||||
fi
|
|
||||||
|
|
||||||
sed -i "s#OCSEMailAlarmsFolderURL.*#OCSEMailAlarmsFolderURL = \"mysql://${DBUSER}:${DBPASS}@mysql:3306/${DBNAME}/sogo_alarms_folder\";#" data/conf/sogo/sogo.conf
|
sed -i "s#OCSEMailAlarmsFolderURL.*#OCSEMailAlarmsFolderURL = \"mysql://${DBUSER}:${DBPASS}@mysql:3306/${DBNAME}/sogo_alarms_folder\";#" data/conf/sogo/sogo.conf
|
||||||
sed -i "s#OCSFolderInfoURL.*#OCSFolderInfoURL = \"mysql://${DBUSER}:${DBPASS}@mysql:3306/${DBNAME}/sogo_folder_info\";#" data/conf/sogo/sogo.conf
|
sed -i "s#OCSFolderInfoURL.*#OCSFolderInfoURL = \"mysql://${DBUSER}:${DBPASS}@mysql:3306/${DBNAME}/sogo_folder_info\";#" data/conf/sogo/sogo.conf
|
||||||
sed -i "s#OCSSessionsFolderURL.*#OCSSessionsFolderURL = \"mysql://${DBUSER}:${DBPASS}@mysql:3306/${DBNAME}/sogo_sessions_folder\";#" data/conf/sogo/sogo.conf
|
sed -i "s#OCSSessionsFolderURL.*#OCSSessionsFolderURL = \"mysql://${DBUSER}:${DBPASS}@mysql:3306/${DBNAME}/sogo_sessions_folder\";#" data/conf/sogo/sogo.conf
|
||||||
|
@ -38,4 +23,4 @@ docker run \
|
||||||
--network=${DOCKER_NETWORK} \
|
--network=${DOCKER_NETWORK} \
|
||||||
--network-alias sogo \
|
--network-alias sogo \
|
||||||
-h sogo \
|
-h sogo \
|
||||||
-d -t sogo
|
-d -t andryyy/mailcow-dockerized:sogo
|
||||||
|
|
Loading…
Reference in New Issue