{"id":15022765,"url":"https://github.com/voxpupuli/beaker-docker","last_synced_at":"2026-01-31T14:09:10.635Z","repository":{"id":43659856,"uuid":"98443928","full_name":"voxpupuli/beaker-docker","owner":"voxpupuli","description":"Docker hypervisor for Beaker acceptance testing framework","archived":false,"fork":false,"pushed_at":"2025-12-27T16:05:31.000Z","size":430,"stargazers_count":6,"open_issues_count":4,"forks_count":38,"subscribers_count":58,"default_branch":"master","last_synced_at":"2025-12-29T12:16:59.853Z","etag":null,"topics":["beaker","docker","hacktoberfest","puppet","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voxpupuli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"open_collective":"vox-pupuli","github":"voxpupuli"}},"created_at":"2017-07-26T16:30:15.000Z","updated_at":"2025-12-27T16:04:41.000Z","dependencies_parsed_at":"2023-09-24T10:05:56.868Z","dependency_job_id":"b99ea270-66f9-4bd9-b225-dd076b55e55a","html_url":"https://github.com/voxpupuli/beaker-docker","commit_stats":{"total_commits":214,"total_committers":33,"mean_commits":6.484848484848484,"dds":0.7149532710280374,"last_synced_commit":"5f8496e0e368d321a41de2462024c946beebf53a"},"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"purl":"pkg:github/voxpupuli/beaker-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fbeaker-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fbeaker-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fbeaker-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fbeaker-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voxpupuli","download_url":"https://codeload.github.com/voxpupuli/beaker-docker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fbeaker-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28944790,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T13:02:32.153Z","status":"ssl_error","status_checked_at":"2026-01-31T13:00:07.528Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["beaker","docker","hacktoberfest","puppet","ruby"],"created_at":"2024-09-24T19:58:21.798Z","updated_at":"2026-01-31T14:09:10.612Z","avatar_url":"https://github.com/voxpupuli.png","language":"Ruby","funding_links":["https://opencollective.com/vox-pupuli","https://github.com/sponsors/voxpupuli"],"categories":[],"sub_categories":[],"readme":"# beaker-docker\n\n[![License](https://img.shields.io/github/license/voxpupuli/beaker-docker.svg)](https://github.com/voxpupuli/beaker-docker/blob/master/LICENSE)\n[![Test](https://github.com/voxpupuli/beaker-docker/actions/workflows/test.yml/badge.svg)](https://github.com/voxpupuli/beaker-docker/actions/workflows/test.yml)\n[![codecov](https://codecov.io/gh/voxpupuli/beaker-docker/branch/master/graph/badge.svg?token=Mypkl78hvK)](https://codecov.io/gh/voxpupuli/beaker-docker)\n[![Release](https://github.com/voxpupuli/beaker-docker/actions/workflows/release.yml/badge.svg)](https://github.com/voxpupuli/beaker-docker/actions/workflows/release.yml)\n[![RubyGem Version](https://img.shields.io/gem/v/beaker-docker.svg)](https://rubygems.org/gems/beaker-docker)\n[![RubyGem Downloads](https://img.shields.io/gem/dt/beaker-docker.svg)](https://rubygems.org/gems/beaker-docker)\n[![Donated by Puppet Inc](https://img.shields.io/badge/donated%20by-Puppet%20Inc-fb7047.svg)](#transfer-notice)\n\nBeaker library to use docker hypervisor\n\n* [How to use this wizardry](#how-to-use-this-wizardry)\n  * [Nodeset Options](#nodeset-options)\n  * [Privileged containers](#privileged-containers)\n  * [Cleaning up after tests](#cleaning-up-after-tests)\n* [Working with `podman`](#working-with-podman)\n* [Generating a Dockerfile](#generating-a-dockerfile)\n* [Spec tests]()\n* [Acceptance tests]()\n* [Transfer Notice](#transfer-notice)\n* [License](#license)\n* [Release Information](#release-information)\n\n## How to use this wizardry\n\nThis gem that allows you to use hosts with [docker](docker.md) hypervisor with [beaker](https://github.com/voxpupuli/beaker).\n\nBeaker will automatically load the appropriate hypervisors for any given hosts\nfile, so as long as your project dependencies are satisfied there's nothing else\nto do. No need to `require` this library in your tests.\n\nIn order to use a specific hypervisor or DSL extension library in your project,\nyou will need to include them alongside Beaker in your Gemfile or\nproject.gemspec. E.g.\n\n```ruby\n# Gemfile\ngem 'beaker', '~\u003e 4.0'\ngem 'beaker-docker'\n# project.gemspec\ns.add_runtime_dependency 'beaker', '~\u003e 4.0'\ns.add_runtime_dependency 'beaker-docker'\n```\n\n### Nodeset Options\n\nThe following is a sample nodeset:\n\n```yaml\nHOSTS:\n  el8:\n    platform: el-8-x86_64\n    hypervisor: docker\n    image: centos:8\n    docker_cmd: '[\"/sbin/init\"]'\n    # Run arbitrary things\n    docker_image_commands:\n      - 'touch /tmp/myfile'\n    dockeropts:\n      Labels:\n        thing: 'stuff'\n      HostConfig:\n        Privileged: true\n  el7:\n    platform: el-7-x86_64\n    hypervisor: docker\n    image: centos:7\n    # EL7 images do not support nested systemd\n    docker_cmd: '/usr/sbin/sshd -D -E /var/log/sshd.log'\nCONFIG:\n  docker_cap_add:\n    - AUDIT_WRITE\n```\n\n### Privileged containers\n\nContainers are run in privileged mode by default unless capabilities are set.\n\nIf you wish to disable privileged mode, simply set the following in your node:\n\n```yaml\ndockeropts:\n  HostConfig:\n    Privileged: false\n```\n\n### Cleaning up after tests\n\nContainers created by this plugin may not be destroyed unless the tests complete\nsuccessfully. Each container created is prefixed by `beaker-` to make filtering\nfor clean up easier.\n\nA quick way to clean up all nodes is as follows:\n\n```sh\npodman rm -f $( podman ps -q -f name=\"beaker-*\" )\n```\n\n## Working with `podman`\n\nIf you're using a version of `podman` that has API socket support then you\nshould be able to simply set `DOCKER_HOST` to your socket and connect as usual.\n\nYou also need to ensure that you're using a version of the `docker-api` gem that\nsupports `podman`.\n\nYou may find that not all of your tests work as expected. This will be due to\nthe tighter system restrictions placed on containers by `podman`. You may need\nto edit the `dockeropts` hash in your nodeset to include different flags in the\n`HostConfig` section.\n\nSee the\n[HostConfig](https://any-api.com/docker_com/engine/docs/Definitions/HostConfig)\nportion of the docker API for more information.\n\n## Generating a Dockerfile\n\nUsually beaker-docker is used to provision docker instances with beaker. During\nthis step beaker-docker generates a Dockerfile and posts it to the docker daemon\nAPI.\n\nThere's also a small CLI command to only generate the file:\n\n```\nbundle exec beaker-docker dockerfile archlinux-64\n```\n\nWill generate a local `Dockerfile`:\n\n```dockerfile\nFROM archlinux/archlinux\nENV container docker\nRUN pacman --sync --refresh --noconfirm archlinux-keyring \u0026\u0026 pacman --sync --refresh --noconfirm --sysupgrade \u0026\u0026 pacman --sync --noconfirm curl ntp net-tools openssh \u0026\u0026 ssh-keygen -A \u0026\u0026 sed -ri 's/^#?UsePAM .*/UsePAM no/' /etc/ssh/sshd_config \u0026\u0026 systemctl enable sshd\nRUN mkdir -p /var/run/sshd \u0026\u0026 echo root:root | chpasswd\nRUN sed -ri -e 's/^#?PermitRootLogin .*/PermitRootLogin yes/' -e 's/^#?PasswordAuthentication .*/PasswordAuthentication yes/' -e 's/^#?UseDNS .*/UseDNS no/' -e 's/^#?MaxAuthTries.*/MaxAuthTries 1000/' /etc/ssh/sshd_config\nEXPOSE 22\nCMD [\"/sbin/init\"]\n```\n\nThis works by calling\n(beaker-hostgenerator](https://github.com/voxpupuli/beaker-hostgenerator?tab=readme-ov-file#beaker-host-generator).\nSo you can provide any host string that's supported by beaker-hostgenerator.\n\nFor non-rolling release distros this is usually `$os$majorversion-$architecture`\n\n```\nbeaker-docker dockerfile centos9-64\n```\n\n```dockerfile\nFROM quay.io/centos/centos:stream9\nENV container docker\nRUN dnf clean all \u0026\u0026 dnf install -y sudo openssh-server openssh-clients chrony \u0026\u0026 ssh-keygen -A \u0026\u0026 sed 's@session *required *pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/*\nRUN mkdir -p /var/run/sshd \u0026\u0026 echo root:root | chpasswd\nRUN sed -ri -e 's/^#?PermitRootLogin .*/PermitRootLogin yes/' -e 's/^#?PasswordAuthentication .*/PasswordAuthentication yes/' -e 's/^#?UseDNS .*/UseDNS no/' -e 's/^#?MaxAuthTries.*/MaxAuthTries 1000/' /etc/ssh/sshd_config\nRUN cp /bin/true /sbin/agetty\nRUN dnf install -y cronie crontabs initscripts iproute openssl wget which glibc-langpack-en hostname\nEXPOSE 22\nCMD [\"/sbin/init\"]\n```\n\nThis requires a running docker daemon. You can also request a containerfile.\nThis will currently generate a `Containerfile` but with the same content (this\nmay change in the future, depending on the API spec).\n\n## Spec tests\n\nSpec test live under the `spec` folder. There are the default rake task and therefore can run with a simple command:\n\n```bash\nbundle exec rake test:spec\n```\n\n## Acceptance tests\n\nThere is a simple rake task to invoke acceptance test for the library:\n\n```bash\nbundle exec rake test:acceptance\n```\n\n## Transfer Notice\n\nThis plugin was originally authored by [Puppet Inc](http://puppet.com).\nThe maintainer preferred that Puppet Community take ownership of the module for future improvement and maintenance.\nExisting pull requests and issues were transferred over, please fork and continue to contribute here.\n\nPreviously: https://github.com/puppetlabs/beaker\n\n## License\n\nThis gem is licensed under the Apache-2 license.\n\n## Release information\n\nTo make a new release, please do:\n* update the version in `lib/beaker-docker/version.rb`\n* Install gems with `bundle install --with release --path .vendor`\n* generate the changelog with `bundle exec rake changelog`\n* Check if the new version matches the closed issues/PRs in the changelog\n* Create a PR with it\n* After it got merged, push a tag. GitHub actions will do the actual release to rubygems and GitHub Packages\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fbeaker-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoxpupuli%2Fbeaker-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fbeaker-docker/lists"}