Giter VIP home page Giter VIP logo

dockerfile-utils's Introduction

Dockerfile Utilities

Node.js Builds Coverage Status Build Dependencies License: MIT

This is a collection of utilities for working with Dockerfiles powered by Node.js written in TypeScript. To install and run these utilities, you will need to have Node.js or Docker installed on your computer.

Supported features:

  • formatting
  • linting

Development Instructions

If you wish to build and compile this project, you must first install Node.js if you have not already done so. After you have installed Node.js and cloned the repository with Git, you may now proceed to build and compile the project with the following commands:

npm install
npm run build
npm test

If you are planning to change the code, use npm run watch to get the TypeScript files transpiled on-the-fly as they are modified.

Installation Instructions

To add this library as a dependency to your project, please add dockerfile-utils as a dependency in your project's package.json file.

Running the CLI with Node.js

To install and use the dockerfile-utils command line interface, please install the dockerfile-utils npm module. The -g flag will install the NPM module globally onto your computer.

npm install -g dockerfile-utils

After the installation has completed, you can run the CLI using the dockerfile-utils binary.

> dockerfile-utils --help
Usage: dockerfile-utils <command> [<args>]

Options:

  -h, --help                Output usage information
  -v, --version             Output version information

Commands:

  format                    Format a Dockerfile
  lint                      Validate a Dockerfile

Running the CLI with Docker

You can use docker run to launch the command line interface with Docker. This removes the requirement of needing to have Node.js installed locally on your computer. The dockerfile-utils binary is available as a Docker image under the name rcjsuen/dockerfile-utils.

> docker run rcjsuen/dockerfile-utils --help
Usage: dockerfile-utils <command> [<args>]

Options:

  -h, --help                Output usage information
  -v, --version             Output version information

Commands:

  format                    Format a Dockerfile
  lint                      Validate a Dockerfile

To format or lint a Dockerfile in the current working directory, please use the following commands.

> docker run -v `pwd`/Dockerfile:/Dockerfile rcjsuen/dockerfile-utils format /Dockerfile
> docker run -v `pwd`/Dockerfile:/Dockerfile rcjsuen/dockerfile-utils lint /Dockerfile

dockerfile-utils's People

Contributors

jsoref avatar rcjsuen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.