Giter VIP home page Giter VIP logo

npm-docker-build-slave's Introduction

NodeJS docker build slave

Docker build slave for php for Jenkins

About

Image inspired by bibinwilson/jenkins-docker-slave
Used in a setup like the one found in this article

Building

Because I also deploy from these images i have som ssh related files in the ssh folder which are not included.

Prerequisites

  • Create your ssh key and put it in ssh/id_rsa
  • Add the host identifier to ssh/known_hosts
  • Add the public key that the jenkins server needs to use to connect to the image to ssh/authorized_keys

Create

To build the image run docker-compose build

I prefer not having to remember a lot of parameters and so on, so there is both a Dockerfile and a docker-compose.yml the yml file is solely there to tag and name the image correctly, if you choose to just keep the image on your docker host instead of forking it and putting it in github.

Useful tidbits

Adding host keys to the known_hosts explicitly

instead of digging though an existing known_hosts, just execute this command:
ssh-keyscan -H remote.server.dk >> ssh/known_hosts There is a pitfall - a malicious actor may do a man-in-the-middle attack. by doing this in the image creation, and not in the jenkinsfile, My thought is that the risk is smaller, since we do it less often., this does require rebuilding the image when the keys change.

npm-docker-build-slave's People

Contributors

josste 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.