docker
docker copied to clipboard
Anonaddy container fails to restart
Steps to reproduce this issue
- Use docker-compose to create an anonaddy stack
- Restart the computer or do docker-compose restart anonaddy
- Container fails to start with error:
Creating AnonAddy env file
Trust all proxies
[cont-init.d] 13-config-anonaddy.sh: exited 0.
[cont-init.d] 14-config-rspamd.sh: executing...
Copying DKIM private key for Rspamd
mkdir: can't create directory '/var/lib/rspamd/dkim': File exists
[cont-init.d] 14-config-rspamd.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
The only way to fix it seems to be to rebuild the stack.
docker-compose down
docker-compose up -d
Please post your compose stack and also gives output of docker compose version.
docker-compose version 1.29.2
version: "3.5"
services:
db:
image: mariadb:10.5
container_name: anonaddy_db
command:
- "mysqld"
- "--character-set-server=utf8mb4"
- "--collation-server=utf8mb4_unicode_ci"
volumes:
- "/home/user/DOCKER_STORAGE/anonaddy/db:/var/lib/mysql"
environment:
- "MYSQL_ALLOW_EMPTY_PASSWORD=yes"
- "MYSQL_DATABASE"
- "MYSQL_USER"
- "MYSQL_PASSWORD"
restart: always
redis:
image: redis:4.0-alpine
container_name: anonaddy_redis
restart: always
anonaddy:
image: anonaddy/anonaddy:0.13.4
container_name: anonaddy
depends_on:
- db
- redis
ports:
- target: 25
published: 25
protocol: tcp
- target: 8000
published: 8000
protocol: tcp
- target: 11334
published: 11334
protocol: tcp
volumes:
- "/home/user/DOCKER_STORAGE/anonaddy/data:/data"
env_file:
- "./anonaddy.env"
environment:
- "DB_HOST=db"
- "DB_DATABASE=${MYSQL_DATABASE}"
- "DB_USERNAME=${MYSQL_USER}"
- "DB_PASSWORD=${MYSQL_PASSWORD}"
- "REDIS_HOST=redis"
restart: always
logging:
driver: journald
options:
tag: "container-{{.Name}}"
Just to be clear, it works fine on the first start. Its only if you restart the container, or restart the host that the error happens.