Public Repository

Last pushed: a year ago
Short Description
Image with a script that transforms Docker Compose files into either Docker or Rkt Fleet unit files.
Full Description

Tags & Dockerfile

Usage

Given a docker-compose.yml file with either one or several services defined, compose2fleet will generate one .service unit file for each service. In case of using rkt as the container runtime, one .conf file will be generated for each user defined network.

version: '2'
services:
  grafana:
    image: grafana:latest
    container_name: grafana
    restart: on-failure
    ports:
    - "3000:3000"
    volumes:
    - /home/grafana/data:/grafana/data
    - /home/grafana/logs:/grafana/logs
    depends_on:
    - influxdb
    - prometheus
  influxdb:
    image: influxdb:0.13.0
    container_name: influxdb
    restart: on-failure
    ports:
    - "2003:2003"
    - "8083:8083"
    - "8086:8086"
    volumes:
    - influxdb:/influxdb
  prometheus:
    image: prometheus:0.20.0
    container_name: prometheus
    restart: on-failure
    ports:
    - "9090:9090"
    volumes:
    - /prometheus
volumes:
   influxdb:
networks:
  gip_net:
    driver: bridge

Running the container on the same directory of the Docker Compose file:

Using rkt

$ docker run --rm -v $(pwd):/data/ jfusterm/compose2fleet -r docker-compose.yml
Created rkt network: gip_net.conf
Rkt service created: grafana.service
Rkt service created: prometheus.service
Rkt service created: influxdb.service

Using Docker

$ docker run --rm -v $(pwd):/data/ jfusterm/compose2fleet -d docker-compose.yml
Rkt service created: grafana.service
Rkt service created: prometheus.service
Rkt service created: influxdb.service

Help

$ compose2fleet -v
usage: compose2fleet [-h] [-d | -r] [-o OUTPUT] [-v] file

Convert Docker Compose files to CoreOS Fleet units

positional arguments:
  file                  docker compose file

optional arguments:
  -h, --help            show this help message and exit
  -d, --docker          select docker as the container runtime
  -r, --rkt             select rkt as the container runtime
  -o OUTPUT, --output OUTPUT
                        select the output directory
  -v                    show program's version number and exit
Docker Pull Command
Owner
jfusterm

Comments (0)