Uploaded images to Docker hub

master
andryyy 2016-12-13 22:12:54 +01:00
parent 1910e3bc29
commit 94530fcecd
6 changed files with 5 additions and 105 deletions

View File

@ -10,24 +10,9 @@ if [[ ! -z $(docker ps -af "name=${NAME}" -q) ]]; then
docker rm $(docker ps -af "name=${NAME}" -q)
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 \
-v ${PWD}/data/conf/pdns/:/etc/powerdns/ \
--network=${DOCKER_NETWORK} \
-h pdns \
--name ${NAME} \
-d pdns
-d andryyy/mailcow-dockerized:pdns

View File

@ -4,10 +4,6 @@
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)
if [[ ! ${PDNS_IP} =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
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)
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
docker run \
@ -45,7 +30,7 @@ docker run \
--network-alias=rspamd \
-h rspamd \
--name ${NAME} \
-d rspamd
-d andryyy/mailcow-dockerized:rspamd
/bin/bash ./fix-permissions.sh

View File

@ -10,24 +10,9 @@ if [[ ! -z $(docker ps -af "name=${NAME}" -q) ]]; then
docker rm $(docker ps -af "name=${NAME}" -q)
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 \
-v ${PWD}/data/conf/rmilter/:/etc/rmilter.conf.d/:ro \
--network=${DOCKER_NETWORK} \
-h rmilter \
--name ${NAME} \
-d rmilter
-d andryyy/mailcow-dockerized:rmilter

View File

@ -4,32 +4,12 @@ source mailcow.conf
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}..."
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
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/*
docker run \

View File

@ -10,32 +10,12 @@ if [[ ! ${PDNS_IP} =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
exit 1
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}..."
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
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 "/^password/c\password = ${DBPASS}" data/conf/postfix/sql/*
sed -i "/^dbname/c\dbname = ${DBNAME}" data/conf/postfix/sql/*
@ -52,4 +32,4 @@ docker run \
--network=${DOCKER_NETWORK} \
--network-alias postfix \
-h ${MAILCOW_HOSTNAME} \
-d postfix
-d andryyy/mailcow-dockerized:postfix

View File

@ -10,21 +10,6 @@ if [[ ! -z $(docker ps -af "name=${NAME}" -q) ]]; then
docker rm $(docker ps -af "name=${NAME}" -q)
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#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
@ -38,4 +23,4 @@ docker run \
--network=${DOCKER_NETWORK} \
--network-alias sogo \
-h sogo \
-d -t sogo
-d -t andryyy/mailcow-dockerized:sogo