Giter Site home page Giter Site logo

xlyk / docker-jnlp-slave-docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from korekontrol/docker-jnlp-slave-docker

0.0 1.0 0.0 22 KB

Docker JNLP slave with docker installed

Home Page: https://www.korekontrol.eu/

License: MIT License

Shell 65.66% Dockerfile 34.34%

docker-jnlp-slave-docker's Introduction

Jenkins JNLP Agent Docker image with docker inside

Docker Stars Docker Pulls Docker Automated build

This is an image for Jenkins agent (FKA "slave"/"worker") using JNLP to establish connection. This agent is powered by the Jenkins Remoting library, which version is being taken from the base Docker Agent image.

It includes addionally to original image tools useful on CI/CD workers:

  • docker installed locally for docker-inside-docker or docker-outside-docker scenario
  • awscli
  • j2cli
  • kubectl
  • helm

See Jenkins Distributed builds for more info.

Running

To run a Docker container

docker run korekontrol/jnlp-slave-docker -url http://jenkins-server:port <secret> <agent name>

Optional environment variables:

  • JENKINS_URL: url for the Jenkins server, can be used as a replacement to -url option, or to set alternate jenkins URL
  • JENKINS_TUNNEL: (HOST:PORT) connect to this agent host and port instead of Jenkins server, assuming this one do route TCP traffic to Jenkins master. Useful when when Jenkins runs behind a load balancer, reverse proxy, etc.
  • JENKINS_SECRET: agent secret, if not set as an argument
  • JENKINS_AGENT_NAME: agent name, if not set as an argument

Running docker inside docker

If you want to use Jenkins in a container for building and running docker images, you must run docker inside/outside docker. Two scenarios are possible - see: https://applatix.com/case-docker-docker-kubernetes-part/ Docker outside docker seems very slow...

Configuration specifics

Enabled JNLP protocols

By default, the JNLP3-connect is disabled due to the known stability and scalability issues. You can enable this protocol on your own risk using the JNLP_PROTOCOL_OPTS=-Dorg.jenkinsci.remoting.engine.JnlpProtocol3.disabled=false property (the protocol should be enabled on the master side as well).

In Jenkins versions starting from 2.27 there is a JNLP4-connect protocol. If you use Jenkins 2.32.x LTS, it is recommended to enable the protocol on your instance.

Amazon ECS

Make sure your ECS container agent is updated before running. Older versions do not properly handle the entryPoint parameter. See the entryPoint definition for more information.

Credits

Created by Marek Obuchowicz from KoreKontrol - kubernetes consulting

License

MIT

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.