sudo yum install -y java-17-amazon-corretto
git code ⇒ build ⇒ push ⇒ deploy
devsecops ⇒ git checkout ⇒ git leaks scan ⇒ sonar scan ⇒ build ⇒ image scan / trivy ⇒ push ⇒ deploy
ecr policy
Re-run Jenkins with Docker Socket Mounted: When you run Jenkins in Docker, you’ll need to mount the host’s Docker socket into the Jenkins container. This allows the Jenkins container to communicate with the Docker daemon running on your local system.
Run the following command to start the Jenkins container with Docker socket mounted:
docker run -d \
-p 8080:8080 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v jenkins_home:/var/jenkins_home \
--name jenkins \
jenkins/jenkins:latest
Here’s what this does:
-v /var/run/docker.sock:/var/run/docker.sock
: This mounts the Docker socket from your host (/var/run/docker.sock) into the Jenkins container, allowing Jenkins inside the container to access Docker on the host.
-v jenkins_home:/var/jenkins_home
: This persists your Jenkins configuration and jobs, even if the container is removed.
-p 8080:8080
: Exposes the Jenkins UI on port 8080 of your host.