Git Product home page Git Product logo

node-docker's Introduction

node+docker

Node+Docker includes Node and the docker-engine to ease CI/CD by enabling the working with the an external/mapped docker host for building Docker images.

Please note: This container does not set out to be secure, it sets out to be usable as a tool in a self-contained private CI/CD setting.

Docker tags

The Docker tag is in the format: node${NODE_VERSION}-docker${DOCKER_VERSION} where node version and the docker version is replaced with one of the following versions:

app supported versions
node 6, 8, 9, 10
docker 1.5.0, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.8.0, 1.8.1, 1.8.2, 1.8.3, 1.9.0, 1.9.1, 1.10.0, 1.10.1, 1.10.2, 1.10.3, 1.11.0, 1.11.1, 1.11.2, 1.12.0, 1.12.1, 1.12.2, 1.12.3, 1.12.4, 1.12.5, 1.12.6, 1.13.0, 1.13.1
docker-ce 17.03.0ce, 17.03.1ce, 17.04.0ce, 17.05.0ce

If you are after a specific Dockerfile, you can view the Github Repo, where each version tag has been pushed to a separate branch.

Example

Say I want, Node 8 with Docker CE 17.03, you would run:

docker pull matthewhartstonge/node-docker:node8-docker17.03.1ce

Quickstart

Since this image is based on dockerhub's node, all actions follow through on this container, with the exception of the addition of the docker-engine.

The underlying OS is debian:jessie.

To get access to your host, simply map the docker socket into the container on startup.

docker run -it \
    -v "/var/run/docker.sock:/var/run/docker.sock"
    matthewhartstonge/node-docker
    docker ps

Development

Each node/docker version is split out into a separate branch. Please feel free to add Pull Requests to add the different versions you use as a token of thanks and also to give back to the community.

Node build tools

For those that are using anything that requires node-gyp (SASS, argon2 e.t.c.) the build tools (g++, make and python) are now included.

Deployment

Simply pull your required version from dockerhub

docker pull matthewhartstonge/node-docker

Testing

To use CI testing with this image, depending on how your CI environment works, the simplest way to do this is to add an NPM script that can run.

For example, using Mocha, in package.json:

...
  },
  "scripts": {
    "start": "node app.js",
    "test": "node ./node_modules/mocha/bin/mocha test/**/*.test.js"
  },
...

Then in your .drone, .jenkinsfile, .whatever add:

script:
  - npm run test 

node-docker's People

Contributors

matthewhartstonge avatar npeterkamps avatar

Watchers

 avatar  avatar  avatar

node-docker'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.