{"id":20444094,"url":"https://github.com/tknerr/vagrant-docker-baseimages","last_synced_at":"2025-08-12T13:34:25.507Z","repository":{"id":31151371,"uuid":"34711277","full_name":"tknerr/vagrant-docker-baseimages","owner":"tknerr","description":"A collection of Vagrant-friendly docker base images","archived":false,"fork":false,"pushed_at":"2023-11-16T23:42:34.000Z","size":95,"stargazers_count":56,"open_issues_count":5,"forks_count":25,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-12T23:53:35.273Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tknerr.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":"2015-04-28T05:48:07.000Z","updated_at":"2025-04-07T10:49:17.000Z","dependencies_parsed_at":"2024-11-15T10:01:19.403Z","dependency_job_id":null,"html_url":"https://github.com/tknerr/vagrant-docker-baseimages","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tknerr%2Fvagrant-docker-baseimages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tknerr%2Fvagrant-docker-baseimages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tknerr%2Fvagrant-docker-baseimages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tknerr%2Fvagrant-docker-baseimages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tknerr","download_url":"https://codeload.github.com/tknerr/vagrant-docker-baseimages/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647237,"owners_count":21139083,"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":[],"created_at":"2024-11-15T09:51:12.712Z","updated_at":"2025-04-12T23:53:40.948Z","avatar_url":"https://github.com/tknerr.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vagrant-friendly Docker Base Images\n\n[![Circle CI](https://circleci.com/gh/tknerr/vagrant-docker-baseimages/tree/master.svg?style=shield)](https://circleci.com/gh/tknerr/vagrant-docker-baseimages/tree/master)\n\nA collection of Vagrant-friendly docker base images (published for `linux/amd64` and `linux/arm64` platforms) along with corresponding Vagrant baseboxes. Something inbetween the\nofficial distro base image and [puhsion/baseimage](https://phusion.github.io/baseimage-docker/), just enough to make it work with Vagrant.\n\nOn top of the official distro base image it includes:\n\n * the `vagrant` user (password `vagrant`) with passwordless sudo enabled\n * the vagrant insecure public key in `~/.ssh/authorized_keys`\n * `sshd` running in the foreground\n\n\n## Vagrant Baseboxes\n\nThe intended use of the Vagrant-friendly docker base images is to use them as a basebox in your `Vagrantfile`. These baseboxes simply reference one of the [actual docker base images](https://github.com/tknerr/vagrant-docker-baseimages#docker-base-images) below.\n\nThe following baseboxes are currently published on [Vagrant Cloud](https://app.vagrantup.com/boxes/search):\n\n * [`tknerr/baseimage-ubuntu-22.04`](https://app.vagrantup.com/tknerr/boxes/baseimage-ubuntu-22.04)\n * [`tknerr/baseimage-ubuntu-20.04`](https://app.vagrantup.com/tknerr/boxes/baseimage-ubuntu-20.04)\n * [`tknerr/baseimage-ubuntu-18.04`](https://app.vagrantup.com/tknerr/boxes/baseimage-ubuntu-18.04)\n * [`tknerr/baseimage-ubuntu-16.04`](https://app.vagrantup.com/tknerr/boxes/baseimage-ubuntu-16.04)\n * [`tknerr/baseimage-ubuntu-14.04`](https://app.vagrantup.com/tknerr/boxes/baseimage-ubuntu-14.04)\n\n### Usage\n\nUse the `config.vm.box` setting to specify the basebox in your Vagrantfile.\n\nFor example, run `vagrant init tknerr/baseimage-ubuntu-22.04 --minimal` to create the Vagrantfile below:\n```ruby\nVagrant.configure(2) do |config|\n  config.vm.box = \"tknerr/baseimage-ubuntu-22.04\"\nend\n```\n\nThen, running `vagrant up --provider docker` should look similar to this:\n```\nW:\\repo\\sample\u003evagrant up --provider=docker\nBringing machine 'default' up with 'docker' provider...\n==\u003e default: Creating the container...\n    default:   Name: minimal_default_1441605508\n    default:  Image: tknerr/baseimage-ubuntu:22.04\n    default: Volume: /w/repo/sample:/vagrant\n    default:   Port: 0.0.0.0:2222:22\n    default:\n    default: Container created: f366398390f6b33f\n==\u003e default: Starting container...\n==\u003e default: Waiting for machine to boot. This may take a few minutes...\n    default: SSH address: 192.168.59.104:2222\n    default: SSH username: vagrant\n    default: SSH auth method: private key\n    default:\n    default: Vagrant insecure key detected. Vagrant will automatically replace\n    default: this with a newly generated keypair for better security.\n    default:\n    default: Inserting generated public key within guest...\n    default: Removing insecure key from the guest if it's present...\n    default: Key inserted! Disconnecting and reconnecting using new SSH key...\n==\u003e default: Machine booted and ready!\n```\n\n### Multi-Platform Support\n\nIn case you want bring up the docker base images for an architecture different from your host OS\nyou can do that by setting the `$DOCKER_DEFAULT_PLATFORM` environment variable.\n\nFor example, to run the arm64 base image on an amd64 host:\n```\n$ DOCKER_DEFAULT_PLATFORM=linux/arm64 vagrant up --povider docker\n```\n\nOr vice versa, to use the amd64 base image:\n```\n$ DOCKER_DEFAULT_PLATFORM=linux/amd64 vagrant up --povider docker\n```\n\n**Please note:** running the base image under an architecture different from your host OS will run the container emulated under QEMU,\nwhich might be substantially slower than running the container under the native architecture!\n\n## Docker Base Images\n\nIn case you want to work with the actual docker base images directly, the following ones (see subdirectories) are available on [docker hub](https://registry.hub.docker.com) (published as multi-arch docker images, supporting `linux/amd64` and `linux/arm64` platforms):\n\n * [`tknerr/baseimage-ubuntu:22.04`](https://hub.docker.com/r/tknerr/baseimage-ubuntu/tags/)\n * [`tknerr/baseimage-ubuntu:20.04`](https://hub.docker.com/r/tknerr/baseimage-ubuntu/tags/)\n * [`tknerr/baseimage-ubuntu:18.04`](https://hub.docker.com/r/tknerr/baseimage-ubuntu/tags/)\n * [`tknerr/baseimage-ubuntu:16.04`](https://hub.docker.com/r/tknerr/baseimage-ubuntu/tags/)\n * [`tknerr/baseimage-ubuntu:14.04`](https://hub.docker.com/r/tknerr/baseimage-ubuntu/tags/)\n\n### Usage\n\nYou can use it in your Vagrantfile in it's most simple form like this and then\nrun `vagrant up`:\n```ruby\nVagrant.configure(2) do |config|\n  config.vm.provider \"docker\" do |d|\n    d.image = \"tknerr/baseimage-ubuntu:22.04\"\n  end\nend\n```\n\nIf you want to use provisioners, you need to additionally tell vagrant that\nthis container has ssh enabled:\n```ruby\nVagrant.configure(2) do |config|\n  config.vm.provider \"docker\" do |d|\n    d.image = \"tknerr/baseimage-ubuntu:22.04\"\n    d.has_ssh = true\n  end\n\n  # use shell and other provisioners as usual\n  config.vm.provision \"shell\", inline: \"echo 'hello docker!'\"\nend\n```\n\n### Multi-Platform Support\n\nAs an alternative to using the `$DOCKER_DEFAULT_PLATFORM` environment variable mentioned above, you can also\npass the desired `--platform` directly via the docker provider configuration in your Vagrantfile:\n```ruby\nVagrant.configure(2) do |config|\n  config.vm.provider \"docker\" do |d|\n    d.image = \"tknerr/baseimage-ubuntu:22.04\"\n    d.create_args = [ '--platform=linux/arm64' ]\n  end\nend\n```\n\n## Development\n\n### Prerequisites\n\nPrerequisites you need to have installed:\n\n* Docker\n* Vagrant\n* Ruby\n\n### Building and Testing\n\nInstall bundler dependencies first:\n```\n$ bundle install\n```\n\nTo build the Docker Base Images for Ubuntu 22.04:\n```\n$ bundle exec rake build:docker:base_images PLATFORM=ubuntu-22.04\n```\n\nRun integration tests for the Docker Base Image:\n```\n$ bundle exec rake test:docker:base_images PLATFORM=ubuntu-22.04\nrspec --format doc --color --tty spec/baseimage_spec.rb\n\nvagrant-friendly docker baseimages\n  tknerr/baseimage-ubuntu:22.04 (for amd64)\n    is present as a docker image for amd64\n    is referenced in a `Vagrantfile` as a docker image\n    is not created when I run `vagrant status`\n    comes up when I run `vagrant up --no-provision`\n    is now shown as running when I run `vagrant status` again\n    accepts remote ssh commands via `vagrant ssh -c`\n    can be provisioned with a shell script via `vagrant provision`\n    is DISTRIB_ID=Ubuntu / DISTRIB_RELEASE=22.04 in lsb-release file\n    is running under amd64 architecture\n    can be stopped via `vagrant halt`\n    can be destroyed via `vagrant destroy`\n\nFinished in 56.74 seconds (files took 0.31354 seconds to load)\n11 examples, 0 failuress\n```\n\nIn order to build the Vagrant Basebox \"wrappers\" around it:\n```\n$ bundle exec rake build:vagrant:baseboxes PLATFORM=ubuntu-22.04\n```\n\nRun integration tests for the Vagrant Basebox:\n```\n$ bundle exec rake test:vagrant:baseboxes PLATFORM=ubuntu-22.04\nrspec --format doc --color --tty spec/basebox_spec.rb\n\nvagrant base boxes for the docker baseimages\n  tknerr/baseimage-ubuntu-22.04 (running on an amd64 host)\n    is referenced in a `Vagrantfile` as a basebox\n    can be imported via `vagrant box add`\n    comes up via `vagrant up --provider docker`\n    creates a docker container for amd64 architecture\n    can be destroyed via `vagrant destroy`\n\nFinished in 30.08 seconds (files took 0.61239 seconds to load)\n5 examples, 0 failures\n```\n\n### Publishing\n\nThis is currently done manually, and requires to log in to dockerhub / vagrantcloud interactively.\n\nTo publish the docker base image for Ubuntu 22.04 to dockerhub:\n```\n$ bundle exec rake publish:docker:base_images PLATFORM=ubuntu-22.04\n```\n\nTo publish the corresponding vagrant basebox to vagrantcloud:\n```\n$ bundle exec rake publish:vagrant:baseboxes PLATFORM=ubuntu-22.04\n```\n\n## Contributing\n\nHow to contribute?\n\n 1. fork this repo\n 2. create a new branch with your changes\n 3. submit a pull request\n\n## License\n\nMIT - see the accompanying [LICENSE](https://github.com/tknerr/vagrant-docker-baseimages/blob/master/LICENSE) file\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftknerr%2Fvagrant-docker-baseimages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftknerr%2Fvagrant-docker-baseimages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftknerr%2Fvagrant-docker-baseimages/lists"}