GithubHelp home page GithubHelp logo

dockerpkg / dockerpkg Goto Github PK

View Code? Open in Web Editor NEW
44.0 2.0 6.0 10 KB

Build and run node apps in small docker containers using zeit/pkg

License: MIT License

JavaScript 100.00%
pkg docker-container zeit docker-pkg beeman mit

dockerpkg's Introduction

dockerpkg

Build and run node apps in small containers using docker and zeit/pkg.

Introduction

zeit/pkg is a tool to package a NodeJS project into an executable. The resulting packages can be used on a system without having to install NodeJS, npm or the project dependencies.

When used together with a small system like Alpine Linux this can result in simple and minimal Docker images.

This project aims for a very simple workflow to create these small images. It does so by separating the process of building and running the container and it provides a simple helper command to run the build.

Components

dockerpkg/builder

The builder image is based on node:7.9-alpine and it runs the pkg command with some params in the mounted directory.

The result is a generated binary called app.bin in the mounted directory (generally this is the dir of you project).

dockerpkg/runner

The runner images is based on alpine:3.5 and it is made to run the generated app.bin from the /app directory.

dockerpkg cli tool

The dockerpkg is a simple script that executes the docker command with the right parameters to created a build.

It pulls the dockerpkg/runner images and makes sure that the working dir is mounted correctly.

How to use

Please refer to dockerpkg-example for a working example.

Credits

LICENSE

MIT

dockerpkg's People

Contributors

beeman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dockerpkg's Issues

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.