https://github.com/ailispaw/docker-root-packer
DockerRoot Packer for VirtualBox and QEMU
https://github.com/ailispaw/docker-root-packer
Last synced: 11 months ago
JSON representation
DockerRoot Packer for VirtualBox and QEMU
- Host: GitHub
- URL: https://github.com/ailispaw/docker-root-packer
- Owner: ailispaw
- License: gpl-2.0
- Created: 2015-08-07T22:39:26.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2016-04-25T20:30:44.000Z (about 10 years ago)
- Last Synced: 2025-04-13T19:51:50.003Z (over 1 year ago)
- Language: Ruby
- Homepage:
- Size: 78.1 KB
- Stars: 9
- Watchers: 3
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DockerRoot Packer for VirtualBox and QEMU
This builds the following images with [DockerRoot](https://github.com/ailispaw/docker-root)
- docker-root.iso (14MB) : LiveCD image with VirtualBox Guest Addtions
- docker-root.box (13MB) : Vagrant box with docker-root.iso and 40GB HDD
- docker-root.qcow2 (15MB) : qcow2 image with docker-root.img and 40GB HDD
The raw docker-root images are at https://github.com/ailispaw/docker-root.
## Features
- Disable TLS of Docker for simplicity
- In .box and .qcow2
- Expose the official IANA registered Docker port 2375
- 40 GB persistent disk image
- With Vagrant
- Forward the official IANA registered Docker port 2375
- Support NFS synced folder
- Support VirtualBox Shared Folder
- Support Docker provisioner
Note) Pay attention to **exposing the port 2375 without TLS**, as you see the above features.
## Requirements to build
- [VirtualBox](https://www.virtualbox.org/)
- [Vagrant](https://www.vagrantup.com/)
- [Packer](https://packer.io/)
- [QEMU](http://www.qemu.org) to build docker-root.qcow2
Cf.) https://github.com/ailispaw/docker-root-packer/tree/master/contrib/qemu
## Vagrant up
```bash
$ vagrant box add ailispaw/docker-root
$ vagrant init -m ailispaw/docker-root
$ vagrant up
```
## Vagrantfile
```ruby
# A dummy plugin for DockerRoot to set hostname and network correctly at the very first `vagrant up`
module VagrantPlugins
module GuestLinux
class Plugin < Vagrant.plugin("2")
guest_capability("linux", "change_host_name") { Cap::ChangeHostName }
guest_capability("linux", "configure_networks") { Cap::ConfigureNetworks }
end
end
end
Vagrant.configure(2) do |config|
config.vm.define "docker-root"
config.vm.box = "ailispaw/docker-root"
config.vm.box_version = ">= 1.3.9"
config.vm.synced_folder ".", "/vagrant"
# for NFS synced folder
# config.vm.network "private_network", ip: "192.168.33.10"
# config.vm.synced_folder ".", "/vagrant", type: "nfs",
# mount_options: ["nolock", "vers=3", "udp", "noatime", "actimeo=1"]
# for RSync synced folder
# config.vm.synced_folder ".", "/vagrant", type: "rsync",
# rsync__args: ["--verbose", "--archive", "--delete", "--copy-links"]
config.vm.provision :docker do |d|
d.pull_images "busybox"
d.run "simple-echo",
image: "busybox",
args: "-p 8080:8080 -v /usr/bin/dumb-init:/dumb-init:ro --entrypoint=/dumb-init",
cmd: "nc -p 8080 -l -l -e echo hello world!"
end
config.vm.network :forwarded_port, guest: 8080, host: 8080
end
```
## License
Copyright (c) 2015-2016 A.I. <ailis@paw.zone>
Licensed under the GNU General Public License, version 2 (GPL-2.0)
http://opensource.org/licenses/GPL-2.0