하모니카(HamoniKR) os 8.0 Paektu 에서 도커 설치

 

 

 

mailcow 를 설치하려고 도커를 설치하는데 잘 안된다...

 

sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

echo \
  "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release; echo "$UBUNTU_CODENAME") stable"  | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose

 

 

그리고 mailcow 를 root 권한으로 설치하기 위해서

 

su -
cd /opt
git clone https://github.com/mailcow/mailcow-dockerized
cd mailcow-dockerized

 

 

그리고 mailcow 설치

$ ./generate_config.sh 

Found Docker Compose Plugin (native).
Setting the DOCKER_COMPOSE_VERSION Variable to native
Notice: You´ll have to update this Compose Version via your Package Manager manually!
A config file exists and will be overwritten, are you sure you want to continue? [y/N] y
Press enter to confirm the detected value '[value]' where applicable or enter a custom value.
Mail server hostname (FQDN) - this is not your mail domain, but your mail servers hostname: mail.example.com
Timezone [Asia/Seoul]: Asia/Seoul
Which branch of mailcow do you want to use?

Available Branches:
- master branch (stable updates) | default, recommended [1]
- nightly branch (unstable updates, testing) | not-production ready [2]
Choose the Branch with it´s number [1/2] 1
Fetching origin
Already on 'master'
Generating snake-oil certificate...
Generating a 4096 bit RSA private key
.................................................................++
........................................................................................................++
writing new private key to 'data/assets/ssl-example/key.pem'
-----
Copying snake-oil certificate...
Detecting if your IP is listed on Spamhaus Bad ASN List...
Check completed! Your IP is clean

 

 

docker-compose pull 을 입력하는데 아래처럼 에러가 발생하면

 

$ docker-compose pull

ERROR: The Compose file './docker-compose.yml' is invalid because:
services.nginx-mailcow.ports contains an invalid type, it should be a number, or an object
services.nginx-mailcow.ports contains an invalid type, it should be a number, or an object

 

 

vi .env 입력 엔터 후 아래 부분을 수정한다. 0.0.0.0 이 빠져있는데 추가

HTTP_PORT=80
HTTP_BIND=0.0.0.0

HTTPS_PORT=443
HTTPS_BIND=0.0.0.0

 

저장 후에 다시 docker-compose pull 

docker-compose pull

Pulling unbound-mailcow   ... done
Pulling clamd-mailcow     ... done
Pulling sogo-mailcow      ... done
Pulling memcached-mailcow ... done
Pulling netfilter-mailcow ... done
Pulling redis-mailcow     ... done
Pulling php-fpm-mailcow   ... done
Pulling nginx-mailcow     ... done
Pulling acme-mailcow      ... done
Pulling mysql-mailcow     ... done
Pulling postfix-mailcow   ... done
Pulling dovecot-mailcow   ... done
Pulling rspamd-mailcow    ... done
Pulling watchdog-mailcow  ... done
Pulling dockerapi-mailcow ... done
Pulling solr-mailcow      ... done
Pulling olefy-mailcow     ... done
Pulling ofelia-mailcow    ... done
Pulling ipv6nat-mailcow   ... done

 

아래 명령 후 엔터

docker-compose up -d

 

 

 

초기 암호

 

ID : admin
PW : moohoo