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
- Host: GitHub
- URL: https://github.com/anzerr/dockerfile.util
- Owner: anzerr
- License: mit
- Created: 2019-05-09T09:42:57.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-01-21T16:20:02.000Z (about 4 years ago)
- Last Synced: 2025-08-08T13:44:11.050Z (6 months ago)
- Topics: docker, dockerfile, nodejs, util
- Language: JavaScript
- Homepage:
- Size: 81.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### `Intro`

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');
});
```