mailcow-dockerized-docs/docs/manual-guides/Docker/u_e-docker-cust_dockerfiles.en.md
2022-10-19 17:37:41 +02:00

723 B

You need to copy the override file with corresponding build tags to the mailcow: dockerized root folder (i.e. /opt/mailcow-dockerized):

cp helper-scripts/docker-compose.override.yml.d/BUILD_FLAGS/docker-compose.override.yml docker-compose.override.yml

Customize data/Dockerfiles/$service and build the image locally:

docker build data/Dockerfiles/$service -t mailcow/$service:$tag

(without a personalized :$tag docker will use :latest automatically)

Now the created image has to be activated in docker-compose.override.yml, e.g.:

$service-mailcow:
    build: ./data/Dockerfiles/$service
    image: mailcow/$service:$tag

Now auto-recreate modified containers:

docker compose up -d