A converter for various docker cluster formats
Project description
container-transform
container-transform is a small utility to transform various docker container formats to one another.
Currently, container-transform can parse and convert:
ECS task definitions
Docker-compose configuration files
Marathon Application Definitions or Groups of Applications
and it can output to:
Systemd unit files
Quickstart
$ cat docker-compose.yml | container-transform -v { "family": "python-app", "volumes": [ { "name": "host_logs", "host": { "sourcePath": "/var/log/myapp" } } ], "containerDefinitions": [ { "memory": 1024, "image": "postgres:9.3", "name": "db", "essential": true }, { "memory": 128, "image": "redis:latest", "name": "redis", "essential": true }, { "name": "web", "memory": 64, "command": [ "uwsgi", "--json", "uwsgi.json" ], "mountPoints": [ { "sourceVolume": "host_logs", "containerPath": "/var/log/uwsgi/" } ], "environment": [ { "name": "AWS_ACCESS_KEY_ID", "value": "AAAAAAAAAAAAAAAAAAAA" }, { "name": "AWS_SECRET_ACCESS_KEY", "value": "1111111111111111111111111111111111111111" } ], "essential": true } ] } Container web is missing required parameter "image". Container web is missing required parameter "cpu".
Quick Help
Usage: container-transform [OPTIONS] [INPUT_FILE] container-transform is a small utility to transform various docker container formats to one another. Default input type is compose, default output type is ECS Default is to read from STDIN if no INPUT_FILE is provided All options may be set by environment variables with the prefix "CT_" followed by the full argument name. Options: -i, --input-type [ecs|compose|marathon] -o, --output-type [ecs|compose|systemd|marathon] -v, --verbose / --no-verbose Expand/minify json output -q, --quiet Silence error messages --version Show the version and exit. -h, --help Show this message and exit.
Docker Image
To get the docker image, run:
docker pull micahhausler/container-transform:latest
To run the docker image:
docker run --rm -v $(pwd):/data/ micahhausler/container-transform docker-compose.yml # or cat docker-compose.yml | docker run --rm -i micahhausler/container-transform
Installation
To install the latest release (Python 3 only), type:
pip install container-transform
To install the latest code directly from source, type:
pip install git+git://github.com/micahhausler/container-transform.git
Documentation
Full documentation is available at http://container-transform.readthedocs.org
License
MIT License (see LICENSE)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
container-transform-1.1.1.tar.gz
(14.8 kB
view hashes)
Built Distribution
Close
Hashes for container-transform-1.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e5b5853c3bb27967ce1c4e3528e8543eae5f4c6c6939f4a3e5a47989de88c31 |
|
MD5 | 8706808569b1d1abd958ad56c6d28768 |
|
BLAKE2b-256 | 4da9c8362ae4da2c42ea4923a6be4c4f361118b5cd29e7b008efba8bb7627a3f |
Close
Hashes for container_transform-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55e66723143a78c5b9f8ec31fbfe1caadbc0a87fba6127bca7db6aab0f3a39f8 |
|
MD5 | f0010d489ce2bda0b21f16a3a82e68f6 |
|
BLAKE2b-256 | 689edcb179650ee4edade4f2731088b8114ddce222d06c1b2f9571c4f5a1074d |