docker-plugin | Jenkins Cloud Plugin that uses Docker | Continuous Deployment library

 by   jenkinsci Java Version: docker-plugin-1.4 License: MIT

kandi X-RAY | docker-plugin Summary

kandi X-RAY | docker-plugin Summary

docker-plugin is a Java library typically used in Devops, Continuous Deployment, Ansible, Jenkin, Docker applications. docker-plugin has build file available, it has a Permissive License and it has low support. However docker-plugin has 24 bugs and it has 1 vulnerabilities. You can download it from GitHub.

This plugin allows containers to be dynamically provisioned as Jenkins nodes using Docker. It is a Jenkins Cloud plugin for Docker. The aim of this docker plugin is to be able to use a Docker host to dynamically provision a docker container as a Jenkins agent node, let that run a single build, then tear-down that node, without the build process (or Jenkins job definition) requiring any awareness of docker. The Jenkins administrator configures Jenkins with knowledge of one or more docker hosts (or swarms), knowledge of one or more "templates" (which describe the labels/tags that this template provides, the docker image, how to start it, etc) and Jenkins can then run docker containers to provide Jenkins (agent) Nodes on which Jenkins can run builds. Note: There is more than one docker plugin for Jenkins. While this can be confusing for end-users, it's even more confusing when end users report bugs in the wrong place. e.g. if you are using Jenkins pipeline / workflow / Jenkinsfile builds with code including terms like docker.withDockerRegistry or docker.image etc then you're using the docker-workflow plugin and should go to its repository instead of this one. Note: This plugin does not provide a Docker daemon; it allows Jenkins to use a docker daemon. i.e. Once you've installed docker on your OS, this plugin will allow Jenkins to use it.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              docker-plugin has a low active ecosystem.
              It has 480 star(s) with 326 fork(s). There are 46 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 40 open issues and 544 have been closed. On average issues are closed in 382 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of docker-plugin is docker-plugin-1.4

            kandi-Quality Quality

              docker-plugin has 24 bugs (0 blocker, 0 critical, 7 major, 17 minor) and 295 code smells.

            kandi-Security Security

              docker-plugin has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              docker-plugin code analysis shows 1 unresolved vulnerabilities (0 blocker, 0 critical, 1 major, 0 minor).
              There are 8 security hotspots that need review.

            kandi-License License

              docker-plugin is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              docker-plugin releases are available to install and integrate.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              docker-plugin saves you 5750 person hours of effort in developing the same functionality from scratch.
              It has 12022 lines of code, 1077 functions and 154 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed docker-plugin and discovered the below as its top functions. This is intended to give you an instant insight into docker-plugin implemented functionality, and help decide if they suit your requirements.
            • Trigger a Docker ContainerWatch
            • Removes a container
            • Retrieves a list of all the containers in the given container
            • Signal that a container has already been removed
            • Create a robot launcher
            • Get the external IP address of the container
            • Get the binding for an internal port
            • Returns a string representation of this maintenance node
            • Appends a value to a StringBuilder
            • Gets the SSL context
            • Returns the environment variables for this container
            • Creates a hashCode of this instance
            • Compares a docker template to another
            • Returns a string representation of this instance
            • Returns a human - enabled string for this preference
            • Returns a socket to the Docker API endpoint
            • Decreases the usage count for a given entry
            • Compares this object to another
            • Checks if the specified computer is still idle
            • Return a String representation of this instance
            • Add authorized keys to container
            • Initialize the ssh container
            • Returns a hash code for this instance
            • Before creating a container
            • Returns a string representation of this configuration
            • Executes a docker pull on a Docker
            Get all kandi verified functions for this library.

            docker-plugin Key Features

            No Key Features are available at this moment for docker-plugin.

            docker-plugin Examples and Code Snippets

            No Code Snippets are available at this moment for docker-plugin.

            Community Discussions

            QUESTION

            When running gradle task inside map loop the task is running only after the script
            Asked 2020-Oct-07 at 14:28

            I am using a docker plugin to build my docker images, I have a project with multiply services but it is a monolete so I have a single build.gradle file. What I'm trying to do is build all the images using a map loop, but when building the project only the last element in the map is being built.

            These is the relevant parts of the build.gradle file:

            ...

            ANSWER

            Answered 2020-Oct-07 at 13:26

            This is a common misconception of how Gradle works. While the actual build script is evaluated in an imperative way (like a common Groovy script), the task concept is somehow declarative:

            Gradle distinguishes between the configuration phase and the execution phase. During configuration phase, the build script is evaluated and the tasks are configured. During execution phase, all required tasks are executed. Required tasks are tasks that are specified using the command line and their (transitive) dependencies.

            This misconception often becomes apparent when build script authors use println to understand how tasks are executed, but all println statements are evaluated during configuration phase.

            Lets take a look at your concrete problem. You have a loop and inside that loop you have something like docker { ... }. In your title it says "running gradle task inside map loop", so you think that docker { ... } runs a task, but this is not correct. It is correct, that docker is a task in your example, but your code won't run (or execute) the task, your code just configures the task. After the build script is evaluated, Gradle will setup a task graph from all tasks and their configured task dependencies (dependsOn statements). Using this task graph, Gradle will determine the required tasks and execute them.

            Now, knowing that the task docker is not executed but only configured, the problem with your code is pretty obvious: The second configuration of the task overwrites the first configuration. By the way, this has nothing to do with the loop, you could just apply the two configurations subsequently and get the same result:

            Source https://stackoverflow.com/questions/64239234

            QUESTION

            Gradle Kotlin Dsl Build for a Kotlin Gradle Plugin, which depends on a Groovy Class in the same Project
            Asked 2020-Feb-14 at 11:24

            I have a Gradle plugin implemented with Kotlin, which is built with a gradle kotlin DSL build script. This works fine. The build script is as follows and is located in the buildSrc directory of project:

            ...

            ANSWER

            Answered 2020-Feb-14 at 11:24

            I think this is equivalent, though I think it just knocks Java out of the picture, so Groovy/Kotlin/Java buildSrc code won't work...:

            Source https://stackoverflow.com/questions/60210081

            QUESTION

            Set up Docker Build Step in Bamboo
            Asked 2020-Jan-23 at 14:57

            I am currently despairing at the attempt of setting up a docker build step in Atlassian Bamboo.

            For starters, I just want to create a build configuration that runs the hello-world image as a proof of confluence. So far, I have failed.

            I have tried following the steps on https://confluence.atlassian.com/bamboo0609/using-bamboo/jobs-and-tasks/configuring-tasks/configuring-the-docker-task-in-bamboo , but to no avail.

            My setup is this: We have Bamboo installed on an Ubuntu server. I also installed Docker on that server and added the bamboo user to the docker usergroup and restarted the server to make sure the permission change takes effect. At this point, docker run hello-world works when I run it directly on the server. I can also confirm that this is the server that Bamboo runs on since Bamboo went offline whenever I restarted the server that I installed Docker on.

            Then, I have added the docker capability to the server (the agent is the default agent, so it inherits this capability from the server). As the docker path, I have tried various things, none of which worked (aka, the following errors remained the same for each of these):

            • /snap/docker (the first folder that I found on a manual search)
            • /usr/bin/docker (the recommended path, though on inspecting the Ubuntu server I quickly found out that no docker folder exists under /usr/bin on the Ubuntu derver)
            • /var/snap/docker/common/var-lib-docker (the path that Docker returns as its Root Directory when I run docker info on the Ubuntu server)
            • /var/snap/docker (for good measure)

            Now, for the runner, I have tried two different approaches.

            First, I tried using a Docker runner with the following settings: Command: Run a Docker container Docker image: hello-world

            This returns the following error message:

            ...

            ANSWER

            Answered 2020-Jan-23 at 14:57

            Okay, I found out what caused this strange behaviour.

            The problem was that I installed Docker using sudo snap install docker, and apparently installing docker via snap causes problems with Bamboo.

            So I got it to work using these simple steps:

            1. [Server] Uninstalled Snap Docker using sudo snap remove docker
            2. [Server] Reinstalled Docker using sudo apt install docker.io
            3. [Bamboo] Changed the path to Docker in the Server Capabilities to /usr/bin/docker

            After that, the hello-world image build succeeded and printed the expected output to the log.

            Source https://stackoverflow.com/questions/59875321

            QUESTION

            Cannot Find Docker Host Certificate Authentication Credentials
            Asked 2020-Jan-09 at 14:08

            I'm currently running Jenkins lts in docker and i wanted to try the Docker Swarm Plugin. However is can't seem to find the Docker Host Certificate Authentication Credentials anywhere when adding a cloud provider. See Image:Credentials

            Is it a plugin that i need to install? My current docker plugins: docker-commons 1.16

            docker-java-api 3.0.14

            docker-plugin 1.1.9

            docker-swarm 1.8

            docker-workflow 1.21

            I'm at a complete loss, help would be appreciated!

            ...

            ANSWER

            Answered 2020-Jan-09 at 14:08

            As described in the changelogs of docker-commons plugin, "Docker Host Certificate Authentication Credentials" was renamed to "X.509 Client Certificate" since 1.16.

            Link : https://github.com/jenkinsci/docker-commons-plugin/releases/tag/docker-commons-1.16

            Source https://stackoverflow.com/questions/59502340

            QUESTION

            Docker file - Master jenkins - hudson.util.HudsonFailedToLoad
            Asked 2019-Sep-19 at 14:40

            Below is the configuration file for docker-compose:

            ...

            ANSWER

            Answered 2019-Sep-19 at 14:40

            The issue is you use 3 years old Jenkins version 2.7.3. The stack trace is complaining about method

            Source https://stackoverflow.com/questions/58000876

            QUESTION

            gradle docker plugin bmuschko Splitting a build.gradle into two files gives error
            Asked 2019-Sep-02 at 18:46

            I am new to using gradle scripts. I have a build.gradle file that I want to split into two files. I get the following two files once I split the larger build.gradle file.

            build.gradle

            ...

            ANSWER

            Answered 2018-May-29 at 23:06

            I was able to resolve this with help from CDancy (maintainer of the plugin) as follows:

            build.gradle

            Source https://stackoverflow.com/questions/50401722

            QUESTION

            How can I user docker image jenkins/jnlp-slave with Jenkins docker-swarm-plugin (pass agent name)
            Asked 2019-Aug-28 at 12:35

            I have a swarm of three nodes (one manager, two workers). In my swarm, I am running a jenkins service with docker-swarm-plugin (https://github.com/jenkinsci/docker-swarm-plugin) installed. I want to use the plugin to create a build agent container in my swarm for every jenkins job. For the agents I want to user the jenkins/jnlp-slave docker image (https://hub.docker.com/r/jenkinsci/jnlp-slave/). The image expects two arguments for the start:

            1. secret (can be set via JENKINS_SECRET environment variable)
            2. agent name (can be set via JENKINS_AGENT_NAME environment variable)

            The docker-swarm-plugin creates three environment variables:

            1. $DOCKER_SWARM_PLUGIN_JENKINS_AGENT_SECRET (I use this to set the secret)
            2. $DOCKER_SWARM_PLUGIN_JENKINS_AGENT_JAR_URL
            3. $DOCKER_SWARM_PLUGIN_JENKINS_AGENT_JNLP_URL (this contains the agent name)

            I pass the secret to the agent via JENKINS_SECRET environment variable (in ENV section of Jenkins plugin configuration):

            ...

            ANSWER

            Answered 2019-Aug-28 at 12:35

            I opened issue https://github.com/jenkinsci/docker-swarm-plugin/issues/37 on docker-swarm-plugin for this and now with PR https://github.com/jenkinsci/docker-swarm-plugin/pull/39 a new environment variable is added with the created agents name. This can be passed to the docker image and everything works fine!

            Source https://stackoverflow.com/questions/57377058

            QUESTION

            Quarkus cant find third party clasess for Jandex index even with jandex plugin and an empty META-INF/beans.xml
            Asked 2019-Aug-02 at 20:15

            Victor from Chile.

            I have a quarkus application and I want to use quarkus-hibernate-orm for Oracle database, but my Entities classes are in a third party jar, so I just put the dependency in the pom (of entities classes) below of quarkus-hibernate-orm dependency and of course the other quarkus dependencies as well.

            I tried this: How to create a Jandex index in Quarkus for classes in a external module

            The jandex plugin and beans.xml solutions doesnt work for me (I dont tried the third options but seems to work for another people the first two options that already tried.)

            Testing with quarkus 0.20.0 and 0.19.1 and show me the same error.

            pom.xml:

            ...

            ANSWER

            Answered 2019-Aug-02 at 17:51

            Well, I'm not too sure Spring Data will work with Quarkus. We have our own layer called Panache.

            To solve the error you have, you need to create an index for the Spring Data artifact containing the two classes mentioned.

            You can do that using the quarkus.index-dependency method described in my answer here: How to create a Jandex index in Quarkus for classes in a external module.

            Source https://stackoverflow.com/questions/57330663

            QUESTION

            Gradle use of dependencies for non-Java builds
            Asked 2019-Jul-29 at 17:24

            I'm quite new to Gradle. And it shows. We have a build.gradle that builds a Docker image using the plugins found in the com.bmuschko:gradle-docker-plugin:3.0.11 and de.undercouch.download:3.3.0 artifacts. The image is created via the com.bmuschko.docker-remote-api plugin after a set of assets (files) are fetched via the Download task provided by the de.undercouch.download plugin. Works great.

            Here is a snippet of our build.gradle, hopefully the usage is pretty clear. A bit fudged to save space.

            ...

            ANSWER

            Answered 2019-Jul-29 at 17:24

            an answer. sort of. I ran across the 1st example in https://docs.gradle.org/5.2.1/javadoc/org/gradle/api/artifacts/ConfigurationContainer.html that showed exactly what my question hopefully detailed what I was trying to achieve.

            It's still not clear to me the type details - why the Copy task's from method can take an object of type ConfigurationContainer but that's for me to figure out. It's pretty powerful that it can. From the above link, here is the snippet:

            Source https://stackoverflow.com/questions/57190596

            QUESTION

            Embedded cassandra not working after jdk10 upgrade
            Asked 2019-May-12 at 18:19

            Embedded cassandra not working after jdk10 upgrade. Could some one help me on this.

            Cassandra config:

            ...

            ANSWER

            Answered 2018-Sep-20 at 13:14

            the current Cassandra versions are not compatible with jdk10. You'll have to downgrade your java to jdk8.

            Source https://stackoverflow.com/questions/52423745

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install docker-plugin

            A quick setup is :.
            get a docker environment running
            follow the instructions for creating a docker image that can be used as a Jenkins Agent

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/jenkinsci/docker-plugin.git

          • CLI

            gh repo clone jenkinsci/docker-plugin

          • sshUrl

            git@github.com:jenkinsci/docker-plugin.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link