Tag: jenkins

How to bring apache2 default web page im my browser with Dockerfile using jenkins

Apache2 got installed, but unable to load on server. I have the following Dockerfile: FROM myimage:latest RUN apt-get update && apt-get install -y apache2 ENV APACHE_RUN_USER www-data ENV APACHE_RUN_GROUP www-data ENV APACHE_LOG_DIR /var/log/apache2 EXPOSE 80 CMD [“usr/sbin/apache2ctl”,”-D”,”FOREGROUND”] And i use the following command to build from jenkins: sudo docker build -t apachecontainer -f /var/lib/jenkins/docker/Dockerfile /var/lib/jenkins […]

How to use DockerJobProperty in node configuration

I’m using pipeline and my job is looking like this: node(‘docker’) { //Git checkout git url: ‘ssh://blah.blah:29411/test.git’ //Build sh ‘make’ //Verify/Run sh ‘./runme’ } I’m looking how I can configure the node to commit and push the succed docker container based on following documentation:

Calling docker commands from jenkins job as step running outside docker VM

I want to run a docker image create command from a Jenkins job which is running native on my machine with VM running Docker. I’ve installed docker build step plugin and in manage Jenkins page command fails when I try to configure docker using url and version, it says: Test Connection Something went wrong, cannot […]

Jenkins in docker, workspace location

I have a Docker container running Jenkins, I can successfully build my program but I could’nt find out where it is stored. At the end of my build I make a zip file of the JavaScript project (the dist directory) and ask to store it to /var/jenkins_home/canopy.zip , using this script npm install npm install […]

Multi-Branch Pipeline project with Jenkinsfile and Docker best practise

I am new with Jenkins and Docker and have build a new multi-branch pipeline project to be indenpendent from our buildserver configuration. My application includes a Jenkinsfile with several stages and uses two docker images one is the official mongo image from dockerhub the other docker image is created by myself and includes maven and […]

docker build step plugin inside jenkins docker container

We are running jenkins in a docker container and we want to use the docker build step plugin. The documentation tells us: You have to make sure that Docker service is running on slaves where you run the build. In Jenkins global configuration, you need to specify Docker REST API URL (typically somethig like […]

How to find Docker REST API URI for Jenkins

I am running Jenkins on a CentOS machine. I have a job that pulls a Github repo and builds a Docker image using the Docker plugin for Jenkins. When I try running the job I get the error: ERROR: Build step failed with exception java.lang.NullPointerException: uri was not specified at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204) at com.github.dockerjava.core.DockerClientConfig$DockerClientConfigBuilder.withUri(DockerClientConfig.java:406) at org.jenkinsci.plugins.dockerbuildstep.DockerBuilder$DescriptorImpl.createDockerClient(DockerBuilder.java:120) […]

How to get GID of group on host in Dockerfile

I’m buidling a docker image which will serve als jenkins slave. The image needs Java and SSHD. At the moment I have a docker container which can serve as jenkins slave. The user inside my slave is a user jenkins which I’ve created inside my dockerfile. FROM java:8-jdk ENV JENKINS_HOME /var/jenkins_home ARG user=jenkins ARG group=jenkins […]

Install + start ssh in dockerfile derived from official jenkins docker image

I try to build a dockerfile which is derived from the official jenkins image. Inside this dockerfile I want to install openssh-server and start the ssh process. I know it’s possible when I clone the whole github of jenkins and change the dockerfile + startscript there but I don’t want to do that. I tried […]

Docker In Docker – SSL problems

I’m using Docker In Docker for Jenkins Slaves in our CI Pipeline. I have run into an issue regarding SSL. The issue is maven can’t access artifacts located in our Nexus repo, it simply hangs. I tried using curl for debugging. Inside the DinD container, all is fine: $ curl -I https://www.google.com HTTP/1.1 200 OK […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.