Easily convert your unRAID Docker XML templates to Docker Compose YAML files.
I made this short script to move my containers from the native unRAID templates
to the more configurable Docker Compose specifications. The largest reason for
motivation for doing so is to make use of multiple custom networks, something
that is not readily available for the plain docker run
command without a few
wrappers.
Clone this repository:
git clone https://github.com/arifer612/undock-compose cd undock-compose
Install the dependencies using pip
:
pip install -r requirements.txt
Or poetry
:
poetry install
The help dialog provides a good explanation of how this should be used:
usage: undock [-h] [--labels] input [output] undock-compose v0.1.0 - [Prototype] Copyright 2022, Arif Er Convert your unRAID Docker XML templates to Docker Compose YAML files. positional arguments: input Path to the input XML template file. output Path to the output YAML file. Defaults to 'docker- compose.yaml' in the same directory as the input. options: -h, --help show this help message and exit --labels, -l Flag to include unRAID Docker labels for configurations
The following will read the my-gitea.xml
file and convert it to gitea-compose.yaml
.
python undock my-gitea.xml gitea-compose.yaml
The contents of the file can be copied and used in the docker-compose plugin.
Otherwise, spinning it up in unRAID can also be done in the terminal if
docker-compose
is installed:
docker-compose -f gitea-compose.yaml up