Tag: jenkins

Cannot execute ansible playbook via docker container

Im executing a pipeline on jenkins that is inside a docker container. This pipeline calls another docker-compose file that executes an ansible playbook. The service that executes the playbook is called agent, and is defined as follows: agent: image: pjestrada/ansible links: – db environment: PROBE_HOST: “db” PROBE_PORT: “3306” command: [“probe.yml”] this is the images it […]

Jenkins is not waiting for Docker command to finish

I’m trying to get Jenkins to run the following command within docker on a Jenkins slave: docker run -i -v `pwd`:/opt/myapp -w /opt/myapp -t mydockerimage /bin/bash -c “./setup_dev_env.sh && make all” The trouble is that when I run this from within Jenkins the Docker process is spawned, but Jenkins doesn’t wait for it and returns […]

Rebuild Docker container on file changes

For running an ASP.NET Core application, I generated a dockerfile which build the application and copys the source code in the container, which is fetched by Git using Jenkins. So in my workspace, I do the following in the dockerfile: WORKDIR /app COPY src src While Jenkins updates the files on my host correctly with […]

Commit to jenkins docker image does not save changes

I pull the official Jenkins docker image from here. From Jenkins UI I create a new job , install the github plugin and set the repo urls in the job configuration. Finally I save the changes from Jenkins. I want to create a new image as it is. I stop the container, and commit it […]

Docker images versioning for Continuous Integration / Continuous Deployment

We’re implementing our Continuous Integration and Continuous Delivery processes with the use of two well-known concepts: Linux binary packages and Docker images. The most part of the work is already done: we take the code from GitLab repo, compile it and put into the deb packages stored in Aptly, then we create Docker images for […]

Docker in Docker permissions error

I have a docker in docker setup for CI. Essentially, the machine has a jenkins CI server on it that uses the same machines docker socket to create nodes for CI. This was working great until I recently updated docker. I’ve identified the issue, but I can’t seem to figure out the right magic to […]

Jenkins + Docker

I would like to create a continous integration Workflow using Jenkins + BitBucket + Docker + Python. Here are all steps that I imagine: The user push app python code with tests unit and a Dockerfile. BitBucket hook a job on jenkins Jenkins clone the repository. Jenkins build the Dockerfile. Jenkins run the docker image […]

Setup secured Jenkins master with docker

I would like to set up a secured Jenkins master server on ec2 with docker. I’m using standard jenkins docker file from here: https://registry.hub.docker.com/_/jenkins/ By default it opens an unsecured 8080 http port. However I want it to use a standard 443 port with https (at first I want to use self-signed ssl certificate). I […]

How does ENTRYPOINT Docker directive react when extending images

I want to know does react the ENTRYPOINT instruction from Dockerfiles when heritage happens : Let’s say for example I have an image called : jenkins FROM java:8-jdk RUN … ENTRYPOINT [“/bin/tini”, “–“, “/usr/local/bin/jenkins.sh”] By running this image, the ENTRYPOINT directive will start and install the application as expected Let’s say now that I want […]

Jenkins: Can't connect to Docker daemon

I am running Jenkins and Docker on a CentOS machine. I have a Jenkins job that pulls a Github repo and builds a Docker image. When I try running the job I get the error: + docker build -t myProject . Cannot connect to the Docker daemon. Is the docker daemon running on this host? […]

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