mailcow-dockerized-docs/docs/manual-guides/Docker/u_e-docker-cust_dockerfiles.en.md

34 Zeilen
830 B
Markdown

You need to copy the override file with corresponding build tags to the mailcow: dockerized root folder (i.e. `/opt/mailcow-dockerized`):
```
2022-09-01 09:33:47 +02:00
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:
2022-12-14 22:09:09 +01:00
=== "docker compose"
2022-12-14 22:09:09 +01:00
``` bash
docker compose up -d
```
=== "docker-compose"
``` bash
docker-compose up -d
```