5.0.2 • Published 7 months ago

docker-composer v5.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
7 months ago

docker-composer

Generate Docker Compose descriptor from a JSON document.

Node.js CI npm version CodeQL

About the package

The reason behind this package is support the Docker Compose descriptor generation from Javascript. You are able to use all Docker Compose keyword to describe your containers and services.

Docker Compose Reference is HERE.

Changes of the Latest Release

Version 5.0.2 (21.10.2023)

  • Update dependencies

You can find all Release Notes HERE.

Usage

  const composer = require('docker-composer');
    .
  const generatedYML = composer.generate(inputJSON);

Full Example

Input

{
"version" : "3",
"services" :
    {
        "nginx" : {
            "ports" : [
                "80"
                        ],
            "image" : "nginx:latest"
        },
        "http" : {
            "ports" : [
                "443"
            ],
            "image" : "apache:latest"
        }
    }
}

Result

---
  version: "3"
  services:
    nginx:
      ports:
      - "80"
      image: "nginx:latest"
    http:
      ports:
      - "443"
      image: "nginx:latest"

License

Copyright (c) 2015 Tibor Udvari. Released under the MIT license. See LICENSE for details.

5.0.2

7 months ago

5.0.1

8 months ago

5.0.0

1 year ago

4.1.3

1 year ago

4.1.2

2 years ago

4.1.1

2 years ago

4.1.0

2 years ago

4.0.3

2 years ago

4.0.2

3 years ago

4.0.1

3 years ago

4.0.0

3 years ago

3.1.13

4 years ago

3.1.12

4 years ago

3.1.11

4 years ago

3.1.10

4 years ago

3.1.9

4 years ago

3.1.8

4 years ago

3.1.7

4 years ago

3.1.6

4 years ago

3.1.5

4 years ago

3.1.4

5 years ago

3.1.3

5 years ago

3.1.2

5 years ago

3.1.1

5 years ago

3.1.0

5 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.0.2

6 years ago

2.0.1

7 years ago

2.0.0

8 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago