Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@neoskop/dockerfile.js

Package Overview
Dependencies
Maintainers
11
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@neoskop/dockerfile.js

Write configurable, scriptable, reusable dockerfiles in Typescript or plain Javascript.

  • 0.7.0
  • next
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
11
Created
Source

@neoskop/dockerfile.js

Write configurable, scriptable, reusable dockerfiles in Typescript or plain Javascript.

Master
Travis master Test coverage master

Develop
Travis develop Test coverage develop

Usage

CLI

dockerfile-js dockerfile.ts Generates the dockerfile
dockerfile-js dockerfile.ts | docker build -f - . Build a docker image from the generated dockerfile

Typescript:

import { dockerfile, stage, image, run } from "@neoskop/dockerfile.js";

export default dockerfile().stages(
    stage().from(image('node'))
           .commands(
               run('node --version')
            )
);

Javascript:

const { dockerfile, stage, image, run } = require("@neoskop/dockerfile.js");

module.exports = dockerfile().stages(
    stage().from(image('node'))
           .commands(
               run('node --version')
            )
);

Static, factory and async factory export possible.

export default dockerfile().stages(...);
export default () => dockerfile().stages(...);
export default async () => dockerfile().stages(...);

module.exports = dockerfile().stages(...);
module.exports = () => dockerfile().stages(...);
module.exports = async () => dockerfile().stages(...);

Documentation

See Dockerfile Reference for general dockerfile usage. Documentation for dockerfile.js not yet available. Look at the sources for usage details.

Commands

Misc

Testing

This package uses Jest with the ts-jest extension for testing. The following test commands are available

yarn test Single test run
yarn test:watch Reruns the tests on file changes
yarn test:cov Generates a coverage report
yarn test:debug Start the test in debug mode

Versioning

This package follows SemVer and uses @neoskop/flow-bump for versioning.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Keywords

FAQs

Package last updated on 04 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc