Blog Posts:
This repository provides Docker resources for setting up Jenkins using Docker. It includes a Dockerfile and a docker-compose.yml file to simplify the process of running Jenkins in a containerized environment.
Follow these steps to get Jenkins up and running using Docker:
- Ensure that Docker is installed on your machine. If not, you can download and install Docker from Docker's official website.
-
Clone this repository to your local machine:
git clone https://github.com/aburaihan-dev/jenkins-in-docker.git cd jenkins-docker-setup
-
Build the Jenkins Docker image:
docker build -t jenkins-docker .
-
Start Jenkins using Docker Compose:
docker-compose up -d
-
Access Jenkins in your browser by navigating to http://localhost:8080. Follow the on-screen instructions to complete the setup.
export AGENT_SSH_DIR="jenkins-agent-ssh-key" && mkdir -p ${AGENT_SSH_DIR} && ssh-keygen -t rsa -b 4096 -f ./${AGENT_SSH_DIR}/id_rsa
You can customize the Jenkins configuration by modifying the docker-compose.yml file or the Dockerfile based on your specific requirements.
Feel free to contribute to this project by opening issues or submitting pull requests. Your feedback and contributions are highly appreciated.
This project is licensed under the MIT License.