ZettaIO / restic-compose-backup

Automatic restic backup of a docker-compose setup. https://hub.docker.com/r/zettaio/restic-compose-backup
MIT License
29 stars 16 forks source link

Bug: HOSTNAME env var is copied to backup process container #20

Closed einarf closed 4 years ago

einarf commented 4 years ago

We should never override the HOSTNAME of a container. This seems to happen when we copy env variables to the backup process container. This becomes an issue depending on what order docker returns the containers.

containers.this_container should always be the container we are currently in.

einarf commented 4 years ago

Actually we are not copying a HOSTNAME env var into the container. We only copy over the configured env vars.

I'm wondering if this is a feature in docker when cloning the network stack of a container.

EDIT: Yep it is, and it makes sense.

einarf commented 4 years ago

Seem the only reasonable solution is to mark the backup process container with an env variable.