Tag: jenkins

Enable Jenkins to export build artifact from Docker build environment

This is my current setup: Code is pushed to git Jenkins initiates build Jenkins contacts remote docker host and initiates build based on a Dockerfile which accompanies the code, context including the application code is pushed to the container (uses Docker Plugin) During the build, a custom build environment, pulling and installing additional packages from […]

jenkins job triggering downstram job with paramenters not working

I am trying to execute a downstream job using the jenkins plugin to pass the parameters to the downstream job. I have added the following configuration as a build step: . The top job completes successfully however in the downstream job, where I am using jenkins plugin for docker build and push, it does not […]

Make Jenkins run docker without sudo

I would like to run Docker shell commands on Jenkins like: docker ps Is it possible to do it with out using any plugins? Since Jenkins isn’t a user, but a service account how can I add to docker group?

Same job in parallel on more Docker containers

I defined a job in Jenkins and I want to run it, in parallel, on more Docker containers. I don’t want to use different parameters for this jobs. It is a Selenium script that uploads a file in browser. I want to replicate this job on a n number of Docker containers. I tried to […]

How to change the ownership of Docker-Tomcat log files?

When using the Tomcat Docker image (version 7.0 to be precise) with Docker Compose, I’m trying to share the server’s log files with the host machine through a volume mapping: version: “2” services: tomcat: ports: – “8082:8080” – “10442:1044” volumes: – “./tomcat/logs:/usr/local/tomcat/logs” image: tomcat:7.0 It all works fine – the logs are written to the […]

docker build and publish pull from private repo fails

I have a jenkins job and we build our docker containers using the docker build and publish plugin. Most of the containers are built and published to our private repos in dockerhub without any issues. They inherit images from public repositories and work fine. However we have noticed that dockerfiles that contains FROM private_repo:tag fail […]

Unable to run Docker within another Docker container

I have a Jenkins image, where I need to have several environments, and Docker is, by far, the easiest way to achieve this. I’ve looked to several posts here, about “sibling” containers, and I’ve tried in different ways. If I bind the process and the Docker binary with -v /var/run/docker.sock:/run/docker.sock -v $(which docker):/usr/local/bin/docker: docker run […]

build project with jenkins from gogs (Docker env)

i have a problem with jenkins i push a project to my gogs container but when i set a freestyle project in jenkins and i set my git repository for the build jenkins show me an error: Failed to connect to repository : Command “git -c core.askpass=true ls-`remote -h git@localhost:mygit/spring-docker.git HEAD” returned status code 128:stdout:` […]

Mocking 3rd party API calls without changing code

I have a Flask Restful Service which sends API calls to Meetup API to create Events etc. I want to mock those 3rd party API calls when running tests on jenkins or dev environment (I am using docker). I don’t want to change my api code to fix this problem. What can be the possible […]

Update Docker image and container from Jenkins

I am quite new to Jenkins and Docker so I am stuck with trying to make them work together. What I want is to do next steps: Build my project war-file on Jenkins (Done) Update Docker image and container. In my case I want to stop running container (Tomcat on it), change war-file to the […]

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