Boot2docker with jenkins - docker

I want to install jenkins on Boot2docker but I could not solve it.My aim is to use continous integration with my spring boot project.On Centos,I can install jenkins but with boot3docker how can I install jenkins.I made some researches, maybe I have to pull jenkins image after that I have to run the image on docker container.Is it a good idea to run jenkins from container?I saw a video,the instructor install jenkins on Centos without using container.

Related

Snowflake and Datadog integration

I'm setting up Snowflake and Datadog integration by following this guide.
I installed datadog agent as a docker container. However, when I try to install the snowflake integration by running the following command inside my datadog-agent docker container (via "docker exec -it --user dd-agent dd-agent bash")
datadog-agent integration install datadog-snowflake==2.0.1
I got this error
bash: datadog-agent: command not found
My question is, does datadog-agent docker version support installing integration? If it does, how do I do it? If it doesn't, do I have to install datadog-agent on a VM to do it?
Ok, turns out the datadog-agent inside docker is called agent.
So this allows me to call the datadog-agent command
datadog-agent integration install datadog-snowflake==2.0.1
However, the latest datadog docker container already include the Snowflake integration plugin. So simply configure the configuration file in
/etc/datadog-agent/conf.d/snowflake.d/conf.yaml
is enough to get going.

Jenkins, run job in Docker

I am using Jenkins for my CI/CD and want to run most of my jobs in Docker.
I installed the plugin "CloudBees Docker Custom Build Environment Plugin" which allow me to run my jobs in a given docker as below:
When I check logs I see this:
docker exec --tty --user 996:994 890fd5fc166283923e61ea515d5f49a149e508c231281c39dc05e14d6ab43a09
The uid 996 is the jenkins user which does not even exist inside docker.
That is a problem because I can't do anything once inside docker (apt update, apt install)
Do you guys have any idea how, using that plugin, I can use the real user inside the docker ? (in this case the user must be "node")
Thanks

Jenkins pipeline issue with Docker

When I was trying to run a Jenkins pipeline project, it failed giving this message under the "docker pull node:6-alpine":
<.jenkins/workspace/simple-node-js-react-npm-app#tmp/durable-431710c5/script.sh: line 2: docker: command not found
script returned exit code 127>
I have no idea what's going on here, and I couldn't access the directory mentioned in the error. I am pretty new to Jenkins.
As mentioned here, using the JENKINS Docker Plugin or JENKINS Docker Pipeline Plugin would not be enough to allow a node to use docker.
You still need to install docker on the node itself.
Please follow below steps:
Install the docker engine (yum install docker) on server where Jenkins is running.
Verify docker is installed: run command which docker.
Click on Jenkins manage plugin and install docker plugin.

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 connect to
http://192.168.99.100:2376, cause: null
I've got this docker url from the docker-machine env command.
In the version field, I tried both REST API version and Docker version, but no success.
Is it possible to call Docker from outside the docker VM and from a Jenkins job? If yes how to configure it in Jenkins?

Updating Jenkins on Centos

I'm trying to update Jenkins on Centos7
When I run service Jenkins status command I can see that Jenkins is active.
When I try to connect to Jenkins using the browser I'm getting this message:
refused to connect to http://*****:8080.
I have followed the following steps but it's not working:
1) Run service Jenkins stop command.
2) Replaced Jenkins.war with the new one.
3) Run service Jenkins start command.
i update it using this command :
yum update jenkins
it's working well
This worked for me on RedHat distribution:
sudo service jenkins stop
yum update jenkins
sudo service jenkins start

Resources