Merge pull request #484 from Skydiver84de/master
Improve customized Dockerfile
Dieser Commit ist enthalten in:
Commit
fddaf4a815
2 geänderte Dateien mit 25 neuen und 8 gelöschten Zeilen
|
@ -1,17 +1,25 @@
|
||||||
Sie mĂĽssen die Override-Datei mit den entsprechenden Build-Tags in den mailcow: dockerized Root-Ordner (d.h. `/opt/mailcow-dockerized`) kopieren:
|
Sie mĂĽssen die Override-Datei mit den entsprechenden Build-Tags in den mailcow: dockerized Root-Ordner (d.h. `/opt/mailcow-dockerized`) kopieren:
|
||||||
|
|
||||||
```
|
```
|
||||||
cp helper-scripts/docker-compose.override.yml.d/BUILD_FLAGS/docker-compose.override.yml docker-compose.override.yml
|
cp helper-scripts/docker-compose.override.yml.d/BUILD_FLAGS/docker-compose.override.yml docker-compose.override.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
Nehmen Sie Ihre Ă„nderungen in `data/Dockerfiles/$service` vor und erstellen Sie das Image lokal:
|
Nehmen Sie Ihre Ă„nderungen in `data/Dockerfiles/$service` vor und erstellen Sie das Image lokal:
|
||||||
|
|
||||||
```
|
```
|
||||||
docker build data/Dockerfiles/service -t mailcow/$service
|
docker build data/Dockerfiles/$service -t mailcow/$service:$tag
|
||||||
|
```
|
||||||
|
(Ohne persönlichen :$tag wird automatisch :latest verwendet.)
|
||||||
|
|
||||||
|
|
||||||
|
Nun muss dieser gerade erstellte Container in docker-compose.override.yml aktiviert werden, z.B.:
|
||||||
|
```
|
||||||
|
$service-mailcow:
|
||||||
|
build: ./data/Dockerfiles/$service
|
||||||
|
image: mailcow/$service:$tag
|
||||||
```
|
```
|
||||||
|
|
||||||
Nun werden die geänderten Container automatisch neu erstellt:
|
|
||||||
|
|
||||||
|
Abschliessend müssen die geänderten Container automatisch neu erstellt werden:
|
||||||
```
|
```
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
```
|
```
|
||||||
|
|
|
@ -4,14 +4,23 @@ You need to copy the override file with corresponding build tags to the mailcow:
|
||||||
cp helper-scripts/docker-compose.override.yml.d/BUILD_FLAGS/docker-compose.override.yml docker-compose.override.yml
|
cp helper-scripts/docker-compose.override.yml.d/BUILD_FLAGS/docker-compose.override.yml docker-compose.override.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
Make your changes in `data/Dockerfiles/$service` and build the image locally:
|
|
||||||
|
|
||||||
|
Customize `data/Dockerfiles/$service` and build the image locally:
|
||||||
```
|
```
|
||||||
docker build data/Dockerfiles/service -t mailcow/$service
|
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:
|
Now auto-recreate modified containers:
|
||||||
|
|
||||||
```
|
```
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
```
|
```
|
||||||
|
|
Laden …
In neuem Issue referenzieren