# docker-compose-converter

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

Latest version **0.2.0** (published 2019-06-16) · GNU GPLv3 license · 0 weekly downloads

## Install

```sh
npm install docker-compose-converter
pnpm add docker-compose-converter
yarn add docker-compose-converter
bun add docker-compose-converter
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2019-06-16 |
| First published | 2019-06-14 |
| Weekly downloads | 0 |
| License | GNU GPLv3 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 48 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 17 |
| Author | Fabian Bucher |
| Maintainers | bucherfa |
| Keywords | docker, run, create, to, docker-compose, converter, docker-compose.yml, convert |

## Links

- npm: https://www.npmjs.com/package/docker-compose-converter
- Repository: https://github.com/bucherfa/docker-compose-Converter
- Homepage: https://github.com/bucherfa/docker-compose-Converter#readme
- Issues: https://github.com/bucherfa/docker-compose-Converter/issues
- npm.io page: https://npm.io/package/docker-compose-converter

## Dependencies (2)

- [js-yaml](https://npm.io/package/js-yaml.md) ^3.13.1
- [command-line-args](https://npm.io/package/command-line-args.md) ^5.1.1

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2019-06-16
- 0.1.3 — 2019-06-16
- 0.1.2 — 2019-06-14
- 0.1.1 — 2019-06-14
- 0.1.0 — 2019-06-14

## README

# docker-compose Converter

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

[Online Demo](https://bucherfa.github.io/dcc-web/)

## Example

### Input

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

### Output

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

## Usage

### Install

```bash
npm install docker-compose-converter --save
```

### Include

```javascript
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);
```

---
_Source: https://npm.io/package/docker-compose-converter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
