# Access Your Version Controlled Configuration from a Docker Container

DevFeed: [Access Your Version Controlled Configuration from a Docker Container](<https://devfeed.tech/articles/access-your-version-controlled-configuration-from-a-docker-container-100792.md>)

Original publisher: [Read original article](<https://spin.atomicobject.com/accessing-your-version-controlled-configuration-from-a-docker-container/>)

Author: Matt Fletcher

Published: 2026-10-26T12:00:45Z

Content type: article

Language: en

Sources: [Atomic Object](<https://devfeed.tech/sources/atomic-object.md>)

Topics: [Docker Compose](<https://devfeed.tech/topics/docker-compose.md>), [Docker](<https://devfeed.tech/topics/docker.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [.env](<https://devfeed.tech/topics/dotenv.md>)

Tags: [bind](<https://devfeed.tech/tags/bind.md>), [compose](<https://devfeed.tech/tags/compose.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [directory](<https://devfeed.tech/tags/directory.md>), [docker](<https://devfeed.tech/tags/docker.md>), [docker-container](<https://devfeed.tech/tags/docker-container.md>), [extracurricular-activities](<https://devfeed.tech/tags/extracurricular-activities.md>), [git](<https://devfeed.tech/tags/git.md>), [homelab](<https://devfeed.tech/tags/homelab.md>), [monitoring](<https://devfeed.tech/tags/monitoring.md>)

## AI overview

To avoid keeping separate copies of version-controlled configuration and Docker service data, the author bind-mounts the configuration file directly from the homelab repository into the container. The Gatus Compose example maps `${HOMELAB_DIR}/gatus/config/config.yaml` to `/config/config.yaml:ro`, while its writable data directory comes from `${SERVICE_DATA_DIR}/gatus/data`. The `.env` file sets those host directories separately. The read-only mount fits Gatus because, according to the author, the application has no reason to change its configuration.

## Source excerpt

For years now, I've stubbornly duplicated version-controlled configuration files into my running Docker containers. Meaning, instead of making the files accessible directly by the container, I've been maintaining both the version-controlled file and copies used by the containers. At last, I've found a solution to help avoid the duplication. The problem Right now I keep [...] The post Access Your Version Controlled Configuration from a Docker Container appeared first on Atomic Spin.