This image has the necessary tools to CI/CD environment into one Jenkins node.
1.2K
This Jenkins image is a customization of the official image by adding the necessary packages to deploy with Ansible and Terraform. In addition, packages have been added to perform testing tasks with Pytest and InSpec. It also includes packages like Kubectl and Helm for deployments on top of K8s.
FROM jenkins/jenkins:jdk11
An all in one.
...
# Install and Upgrade pip
# Install Ansible
# Install Terraform
# Install Kubectl
# Install Helm
# Install OpenShift cli
# Install InSpec by Chef
# Install Python3
# Enable Docker
...
To use docker command you must change docker.sock permissions on the docker service where jenkins is running. To do this, just type the following command as root:
$ chmod 666 /var/run/docker.sock
This configuration come to default after reboot server so you need to change it again every time you power on the system. To automate this action you can use the following link https://github.com/aramirol/custom-resources/tree/main/kubernetes/docker.sock.
To use kubectl command you must need to create a configmap with the correct credentials. For example:
$ kubectl create configmap config -n jenkins --from-file=$HOME/.kube/config
To deploy this image just set the following components into your deployment code:
spec:
containers:
- name: jenkins
image: aramirol/jenkins-custom:latest
ports:
- containerPort: 8080
volumeMounts:
- name: jenkins-home
mountPath: /var/jenkins_home
- name: jenkins-docker
mountPath: "/var/run/docker.sock"
- name: jenkins-docker-bin
mountPath: "/usr/bin/docker"
- name: config
mountPath: /var/jenkins_home/.kube/kubeconfig
volumes:
- name: jenkins-home
persistentVolumeClaim:
claimName: jenkins-pvc
- name: jenkins-docker
hostPath:
path: /var/run/docker.sock
- name: jenkins-docker-bin
hostPath:
path: /usr/bin/docker
- name: config
configMap:
defaultMode: 420
name: config
MIT License
Content type
Image
Digest
sha256:db74228f6…
Size
748.7 MB
Last updated
over 3 years ago
docker pull aramirol/jenkins-custom