docker-composer v5.0.2
docker-composer
Generate Docker Compose descriptor from a JSON document.
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.
7 months ago
8 months ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
7 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago