{"id":23381272,"url":"https://github.com/bvis/docker-jenkins","last_synced_at":"2025-04-10T23:21:16.937Z","repository":{"id":149012751,"uuid":"62628751","full_name":"bvis/docker-jenkins","owner":"bvis","description":"This image is designed to allow the execution of any job that contains a dockerized environment.","archived":false,"fork":false,"pushed_at":"2018-09-25T14:31:27.000Z","size":28,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T20:11:12.513Z","etag":null,"topics":["docker","jenkins"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/basi/jenkins/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bvis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-07-05T10:39:22.000Z","updated_at":"2023-09-25T04:18:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"9b0c6269-a647-457a-8ded-4b67c01a3001","html_url":"https://github.com/bvis/docker-jenkins","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bvis%2Fdocker-jenkins","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bvis%2Fdocker-jenkins/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bvis%2Fdocker-jenkins/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bvis%2Fdocker-jenkins/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bvis","download_url":"https://codeload.github.com/bvis/docker-jenkins/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248313073,"owners_count":21082799,"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":["docker","jenkins"],"created_at":"2024-12-21T20:48:38.593Z","updated_at":"2025-04-10T23:21:16.932Z","avatar_url":"https://github.com/bvis.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Softonic Jenkins\n\n[![](https://images.microbadger.com/badges/version/basi/jenkins.svg)](https://microbadger.com/images/basi/jenkins \"basi/jenkins\")\n\nThis image is designed to allow the execution of any job that contains a _dockerized_ environment.\n\n## Container execution\n\nIf you launch it with this command you'll get a working Jenkins server with the host docker injected.\n\n```\ndocker run --name softonic-jenkins \\\n    -u root \\\n    -d -p 8080:8080 -p 50000:50000 \\\n    -v /var/run/docker.sock:/var/run/docker.sock \\\n    -v $(which docker):/usr/bin/docker \\\n    -v /var/jenkins_home:/var/jenkins_home basi/jenkins \\\n    --restart unless-stopped\n```\n\n\n```\ndocker run --rm --name softonic-jenkins \\\n    -u root \\\n    -p 8080:8080 -p 50000:50000 \\\n    -v jenkins-backup:/backup/jenkins_home \\\n    basi/jenkins\n\n```\n\nThis image can restore a jenkins home backup if you mount a valid directory under the `$JENKINS_HOME_BACKUP_DIR` variable.\nInternally it will search for this directory, if it exists in the container and the `/var/jenkins_home` is empty it will copy the content of the last subdirectory found of `$JENKINS_HOME_BACKUP_DIR` in `/var/jenkins_home`.\n\nWhen can this be useful? When you want not to affect performance to the jenkins process mounting a remote volume but you want to ensure that your content will have a backup.\nOf course this works restoring a backup but for update the backup content you need to do something else, for example you can create a silly job that just copies the content from $JENKINS_HOME to $JENKINS_HOME_BACKUP_DIR.\n\n## Usage\n\nAs this image contains *docker-compose* you can execute complex tests with easy commands.\n\nFor example, imagine that your project is PHP based and you are using Composer (nowadays almost all PHP projects use it).\nAnd you define a target to execute your unit tests named \"tests-build\".\nThis target executes your PHPUnit tests and generate a JUnit compatible output in the \"build/logs\" directory\nof your workspace.\n\nIt would allow to the Jenkins server to get these results and use them to check if the build is successful if you define this directory as a volume. This can be achieved if the *docker-compose.build.yml* file has this definition:\n\n```\nversion: \"2\"\n\nservices:\n  web:\n    volumes:\n      - ./build/logs:/var/www/project/build/logs\n```\n\nWhen you execute these commands:\n\n```\nCOMPOSER_COMMAND=\"/usr/local/bin/docker-compose -f docker-compose.yml -f docker-compose.prod.yml -f docker-compose.build.yml\"\n$COMPOSER_COMMAND build\n$COMPOSER_COMMAND up -d\n$COMPOSER_COMMAND exec -T web composer install\n$COMPOSER_COMMAND exec -T web composer tests-build\n$COMPOSER_COMMAND exec -T web composer tests-int-build\n$COMPOSER_COMMAND down\n```\n\nThe docker client will build your project, make it run with the definitions provided in the merged compose definition and execute the targets defined in the composer file.\n\nIn this example I finally execute integration tests based on behat that are generating JUnit output as well, once it's finished the projects is removed.\n\nAfter this you need to use the JUnit generated files in the project workspace as usual.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbvis%2Fdocker-jenkins","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbvis%2Fdocker-jenkins","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbvis%2Fdocker-jenkins/lists"}