An open API service indexing awesome lists of open source software.

https://github.com/anzerr/dockerfile.util

an util for scripting dockerfiles
https://github.com/anzerr/dockerfile.util

docker dockerfile nodejs util

Last synced: 3 months ago
JSON representation

an util for scripting dockerfiles

Awesome Lists containing this project

README

          

### `Intro`
![GitHub Actions status | publish](https://github.com/anzerr/dockerfile.util/workflows/publish/badge.svg)

util to script dockerfile creation

#### `Install`
``` bash
npm install --save git+https://github.com/anzerr/dockerfile.util.git
npm install --save @anzerr/dockerfile.util
```

### `Example`
``` javascript
const util = require('dockerfile.util');

class Busybox extends util.Build {

constructor() {
super();
this.author = 'dave';
}

build() {
return super.build().then(() => {
this.dockerfile[0]
.run('echo "add a run command"')
.cmd('["sh"]');
});
}

}

let a = new Busybox();

a.toFile().then(() => {
return a.run();
}).then(() => {
console.log('done');
});
```