https://github.com/nekroze/docker-compose-gen
Generate docker-compose config segments dynamically.
https://github.com/nekroze/docker-compose-gen
config docker docker-compose dynamic generation go golang
Last synced: about 2 months ago
JSON representation
Generate docker-compose config segments dynamically.
- Host: GitHub
- URL: https://github.com/nekroze/docker-compose-gen
- Owner: Nekroze
- License: gpl-3.0
- Created: 2018-11-02T06:55:11.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-17T22:41:00.000Z (over 7 years ago)
- Last Synced: 2025-10-25T22:21:05.811Z (8 months ago)
- Topics: config, docker, docker-compose, dynamic, generation, go, golang
- Language: Go
- Size: 32.2 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docker-compose-gen
Generate docker-compose config segments dynamically.
# Primary Use Case
It can be helpful to replace the default network with an externally defined one dynamically at time of orchestration.
`docker-compose-gen` can be used like so to make the default network containers are connected to an already defined network called lab.
```bash
docker-compose -f docker-compose.yml -f <(docker-compose-gen network --compose-version 3.1 --external lab) up
```
# Installation
## Docker
You may use the [automated docker image](https://hub.docker.com/r/nekroze/docker-compose-gen) to use `docker-compose-gen` without any other dependencies with the following:
```bash
docker run nekroze/docker-compose-gen:latest network --name backchannel
```
## Go
If you would like to compile and install/update `docker-compose-gen` locally and via the golang tool chain with:
```bash
go get -u github.com/Nekroze/docker-compose-gen/...
```