https://github.com/junosuarez/dockerfile
npm module for working with Docker.io Dockerfiles
https://github.com/junosuarez/dockerfile
Last synced: over 1 year ago
JSON representation
npm module for working with Docker.io Dockerfiles
- Host: GitHub
- URL: https://github.com/junosuarez/dockerfile
- Owner: junosuarez
- License: mit
- Created: 2013-07-15T23:39:34.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-10-31T23:52:25.000Z (over 12 years ago)
- Last Synced: 2025-04-10T15:36:25.881Z (over 1 year ago)
- Language: JavaScript
- Size: 106 KB
- Stars: 9
- Watchers: 7
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# dockerfile
work with Dockerfiles from Docker.io
## usage
```js
var dockerfile = require('dockerfile')
dockerfile()
.name('test')
.rem('a test Dockerfile')
.version('0.5.3')
.dockerVersion('0.4.8')
.maintainer('jden ')
.from('ubuntu:12.10')
.section('install stuff')
.run('apt-get install curl')
.section('add some stuff')
.add('/src', '/dest')
.section('runtime')
.env({
mode: 'PROD',
needs_nachos: 'true'
})
.entrypoint('/bin/node ./index.js')
.export()
```
## api
Implements the [Docker Builder](http://docs.docker.io/en/latest/use/builder/) interface.
Additionally, we support
- `.name()`: give your container a name (should match what you tag it with)
- `.rem(comment)`: add a 1-line comment
- `.section(title)`: break up your file with some new lines & a comment
## installation
$ npm install dockerfile
## running the tests
From package root:
$ npm install
$ npm test
## todo
- add parse support / JSON ast format
## contributors
- jden
## license
MIT. (c) 2013 AgileMD. See LICENSE.md