{"id":24956191,"url":"https://github.com/jeswin-8801/jenkins","last_synced_at":"2026-05-04T02:32:18.360Z","repository":{"id":275438922,"uuid":"926083879","full_name":"Jeswin-8801/Jenkins","owner":"Jeswin-8801","description":"A containerized version of Jenkins server with offline setup (preloaded with required plugins) with reverse proxy","archived":false,"fork":false,"pushed_at":"2025-02-02T14:43:25.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T20:16:55.222Z","etag":null,"topics":["apache-webserver","docker-compose","jenkins"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jeswin-8801.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-02T14:16:11.000Z","updated_at":"2025-02-02T14:58:08.000Z","dependencies_parsed_at":"2025-02-02T15:25:21.905Z","dependency_job_id":"954acb1c-6e10-44b1-b15c-de6e743f91db","html_url":"https://github.com/Jeswin-8801/Jenkins","commit_stats":null,"previous_names":["jeswin-8801/jenkins"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jeswin-8801%2FJenkins","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jeswin-8801%2FJenkins/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jeswin-8801%2FJenkins/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jeswin-8801%2FJenkins/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jeswin-8801","download_url":"https://codeload.github.com/Jeswin-8801/Jenkins/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246093181,"owners_count":20722403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache-webserver","docker-compose","jenkins"],"created_at":"2025-02-03T06:27:56.333Z","updated_at":"2026-05-04T02:32:18.344Z","avatar_url":"https://github.com/Jeswin-8801.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jenkins\n\n[![Jenkins](https://skillicons.dev/icons?i=jenkins,docker)](https://skillicons.dev)\n\nA containerized version of Jenkins server with offline setup (preloaded with required plugins) with reverse proxy\n\n# Installation\n\nSteps to install Apache web server and Docker:\n\n### Apache Web Server Installation\n\n```bash\nsudo apt update\nsudo apt upgrade -y\nsudo apt install apache2 -y\n# to start automatically at boot time\nsudo systemctl enable apache2\n```\n\n### Verifying Installation\n\n\u003e In a new tab open =\u003e http://\\\u003cyour-server-ip\\\u003e\n\n### Installing Docker\n\n\u003e Refer =\u003e https://docs.docker.com/engine/install/ubuntu/#install-from-a-package\n\n```bash\ncurl -k -O -L https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/containerd.io_1.7.25-1_amd64.deb \\\n-O -L https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/docker-buildx-plugin_0.19.3-1~ubuntu.22.04~jammy_amd64.deb \\\n-O -L https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/docker-ce_27.5.0-1~ubuntu.22.04~jammy_amd64.deb \\\n-O -L https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/docker-ce-cli_27.5.0-1~ubuntu.22.04~jammy_amd64.deb \\\n-O -L https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/docker-compose-plugin_2.6.0~ubuntu-jammy_amd64.deb \\\n-O -L https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/docker-scan-plugin_0.23.0~ubuntu-jammy_amd64.deb\n\nsudo dpkg -i ./*.deb\n\n# to start automatically at boot time\nsudo systemctl enable docker\n```\n\n\u003e [!Note]\n\u003e There is an alternate more intuitive method to install the same but if you are behind a corporate network with strict restrictions, you can try the above method. (Remember to update the above links if outdated)\n\n### Verify Installation\n\n```bash\nsudo docker --version\nsudo docker run hello-world\n```\n\n### Jenkins Setup\n\nBefore running jenkins, setup the ssh keys that will be used to fetch the Jenkins pipeline scripts from the private repo in Github.\n\n- In the location where the `docker-compose.yml` file is stored run (Must be an easily accessible location and not be too nested like in the home or root dir):\n\n```bash\nmkdir .ssh\nssh-keygen -t ed25519 -f .ssh/id_ed25519.jenkins -P \"\" -C \"jeswin.santosh@outlook.com\"\n# Also make sure the ssh config file is present\ncat \u003c\u003cEOF \u003econfig\nHost github github.com ssh.github.com\n        HostName ssh.github.com\n        User git\n        port 443\n        IdentityFile ~/.ssh/id_ed25519.jenkins\nEOF\n```\n\n- On a system with a less strict network in the base directory after cloning the repo run:\n```bash\ndocker compose build jenkins\n```\n\n- Now either push the jenkins image that gets generated to docker hub or save as a tar file and use it on the server running jenkins.\n```bash\n# To save to a tarfile\ndocker save -o jenkins.tar Jeswin8802/jenkins-with-plugins:latest\n# to load the image from tarfile on the server\nsudo docker load -i jenkins.tar\n```\n\n\u003e [!Note]\n\u003e Remember to add this key to your github account: \n\u003e Paste the output of `cat .ssh/id_ed25519.pub` into Github\n\n\u003e Refer for more info =\u003e https://www.jenkins.io/doc/book/installing/docker/\n\n\u003e Self signed certificate not recognized (When running docker compose)\n\u003e\n\u003e Refer: https://stackoverflow.com/a/76244812\n\nTo create backup of named volume and bring up the volume from backup\n```bash\nsudo docker run --rm \\\n\t--mount source=jenkins_jenkins-data,target=/mount_point \\\n\t-v \"$(pwd)\":/backup \\\n\tbusybox \\\n\ttar -czf /backup/jenkins-data-export.tgz /mount_point\nsudo docker run --rm \\\n\t--mount source=jenkins_jenkins-data,target=/mount_point \\\n\t-v \"$(pwd)\":/backup \\\n\tbusybox \\\n\ttar -xzf /backup/jenkins-data-export.tgz -C /\n```\n\n# Jenkins as a systemd service\n\n- Save the file `jenkins.service` as `/etc/systemd/system/jenkins.service`\n\n\u003e [!Important]\n\u003e Remember to change the `WorkingDirectory` param in `jenkins.service` to the location where `docker-compose.yml` is stored\n\n```bash\n# To load the new service file\nsudo systemctl daemon-reload\n# To start the service, run the command:\nsudo systemctl start jenkins\n```\n\n*Jenkins should now be up and running. But before accessing the webpage setup reverse proxy by following the steps below*\n\n# Configure Apache to Reverse Proxy Jenkins\n\n### Enable Apache proxy modules\n\n```bash\nsudo a2enmod proxy\nsudo a2enmod proxy_http\nsudo a2enmod headers\n# Required for websocket\nsudo a2enmod proxy_wstunnel\nsudo a2enmod rewrite\n\nsudo systemctl restart apache2\n```\n\n### Create a new Apache site configuration to reverse proxy Jenkins\n\n- Copy the file `jenkins.conf` to `/etc/apache2/sites-available/`:\n\n\u003e Refer =\u003e https://www.jenkins.io/doc/book/system-administration/reverse-proxy-configuration-with-jenkins/reverse-proxy-configuration-apache/\n\n### Enable the new site configuration\n\n```bash\nsudo a2ensite jenkins.conf\nsudo systemctl reload apache2\n```\n\n#### The site can now be accessed at http://\\\u003cyour-server-ip\\\u003e/jenkins\n\n\u003e [!Note]\n\u003e **Initial Setup Password**\n\u003e \n\u003e When prompted for the admin password, use the below command (Note: sudo used) to fetch it from the container running jenkins\n\u003e ```bash\n\u003e sudo docker exec -it $(sudo docker ps -a | grep jenkins | grep -oP \"^\\w+\") cat /var/jenkins_home/secrets/initialAdminPassword\n\u003e ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeswin-8801%2Fjenkins","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeswin-8801%2Fjenkins","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeswin-8801%2Fjenkins/lists"}