Neural Processing Mechanisms

    docker-compose-converter

    0.2.0 • Public • Published

    docker-compose Converter

    Convert docker run/create commands to docker-compose.yml files.

    Online Demo

    Example

    Input

    docker run -d \
      -v nextcloud:/var/www/html \
      nextcloud
    docker run -d \
      -v db:/var/lib/mysql \
      mariadb

    Output

    version: '3'
    services:
      nextcloud:
        image: nextcloud
        volumes:
          - 'nextcloud:/var/www/html'
      mariadb:
        image: mariadb
        volumes:
          - 'db:/var/lib/mysql'

    Usage

    Install

    npm install docker-compose-converter --save

    Include

    const dcc = require('docker-compose-converter');
    const dockerRunCommands = `
    docker run -d \
      -v nextcloud:/var/www/html \
      nextcloud
    docker run -d \
      -v db:/var/lib/mysql \
      mariadb
    `;
    const dockercomposeyml = ddc(dockerRunCommands);
    console.log(dockercomposeyml);

    Install

    npm i docker-compose-converter

    DownloadsWeekly Downloads

    0

    Version

    0.2.0

    License

    GNU GPLv3

    Unpacked Size

    49.1 kB

    Total Files

    8

    Last publish

    Collaborators

    • bucherfa