Last active
November 1, 2025 11:20
-
-
Save karosi12/77ae16b257a726981caa55e3d999d354 to your computer and use it in GitHub Desktop.
To run jenkins as a docker container along side with trivy, aws v2 and terraform cli
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
| #!/bin/bash | |
| # Get the Docker socket group ID from host | |
| DOCKER_GID=$(stat -c '%g' /var/run/docker.sock) | |
| # Run the Jenkins container with correct group access | |
| docker run -d \ | |
| --name jenkins-be \ | |
| -p 8080:8080 -p 50000:50000 \ | |
| -v jenkins_home:/var/jenkins_home \ | |
| -v /var/run/docker.sock:/var/run/docker.sock \ | |
| --memory=4g \ | |
| --memory-swap=4g \ | |
| --group-add $DOCKER_GID \ | |
| jenkin-tf-awscli | |
| # docker pull ghcr.io/karosi12/jenkin-tf-awscli-trivy:latest | |
| # Note: Before you run the above script, make you have docker installed and running on your machine | |
| # the --memory flag is optional you might remove it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment