MF05-PRA05-BorisIvanHuarachiPerez-JenkinsPipeline#83
Open
borizSam wants to merge 1 commit intoAlbertProfe:masterfrom
Open
MF05-PRA05-BorisIvanHuarachiPerez-JenkinsPipeline#83borizSam wants to merge 1 commit intoAlbertProfe:masterfrom
borizSam wants to merge 1 commit intoAlbertProfe:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
title: "JenkinsPRA05"
Configuración exitosa de Jenkins en Docker
Paso 1: Descargar la imagen de Jenkins
Primero, descargamos la imagen oficial de Jenkins desde Docker Hub. Esto garantiza que estamos utilizando la versión más reciente y estable de Jenkins.
Paso 2: Ejecutar el contenedor de Jenkins
Ejecutamos un contenedor basado en la imagen de Jenkins. Es importante otorgar los privilegios necesarios y montar los volúmenes correctos para asegurar la persistencia de datos y el acceso al Docker socket.
sudo docker run --privileged -d \ -p 8080:8080 -p 50000:50000 \ -v /var/run/docker.sock:/var/run/docker.sock \ -v jenkins_home:/var/jenkins_home \ jenkins/jenkins:ltsPaso 3: Instalar Docker dentro del contenedor de Jenkins
Para habilitar Docker dentro del contenedor de Jenkins, conectamos al CLI del contenedor como usuario root y descargamos Docker.
Paso 4: Configurar permisos para Jenkins
Añadimos al usuario
jenkinsal grupodockerpara que pueda gestionar contenedores. Además, configuramos los permisos del socket Docker.Correcta instalación y configuración de los plugins necesarios
Para facilitar la integración y el desarrollo en Jenkins, instalamos los siguientes plugins esenciales:
Implementación adecuada del pipeline de Jenkins para el proyecto Spring Boot
Paso 1: Crear un pipeline en Jenkins
Una vez configuradas las herramientas y plugins necesarios, creamos un pipeline para nuestro proyecto Spring Boot. Este pipeline puede incluir pasos como compilación, pruebas y empaquetado de la aplicación.
Integración exitosa de Docker dentro del pipeline
Paso 1: Ejecutar la pipeline
Validamos que el pipeline se ejecuta correctamente con Docker integrado, permitiendo la construcción y despliegue de contenedores directamente desde Jenkins.