{"id":16773065,"url":"https://github.com/vpavlin/installfest2016","last_synced_at":"2026-05-09T13:13:09.507Z","repository":{"id":74082637,"uuid":"53194245","full_name":"vpavlin/installfest2016","owner":"vpavlin","description":"Demos for my InstallFest 2016 talk","archived":false,"fork":false,"pushed_at":"2017-02-21T10:07:00.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T03:45:24.655Z","etag":null,"topics":["containers","demo","docker","fedora","freebsd","jails","namespaces","vagrant"],"latest_commit_sha":null,"homepage":null,"language":null,"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/vpavlin.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-03-05T09:43:38.000Z","updated_at":"2016-03-05T09:43:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"488ce968-7225-4fd6-ad25-eddeb89ee6e8","html_url":"https://github.com/vpavlin/installfest2016","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/vpavlin%2Finstallfest2016","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vpavlin%2Finstallfest2016/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vpavlin%2Finstallfest2016/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vpavlin%2Finstallfest2016/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vpavlin","download_url":"https://codeload.github.com/vpavlin/installfest2016/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243902287,"owners_count":20366260,"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":["containers","demo","docker","fedora","freebsd","jails","namespaces","vagrant"],"created_at":"2024-10-13T06:44:36.004Z","updated_at":"2026-05-09T13:13:04.452Z","avatar_url":"https://github.com/vpavlin.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# installfest2016\n\n*This is still work in progress*\n\nDemos for my InstallFest 2016 talk\n\nhttps://youtu.be/rTIjheXbwE8?list=PLub6xBWO8gV_Mr-UuxrHcfUbuGv5n_N5g\n\n##Preparations\n\nI am using Vagrant, you can too.\n\n### Fedora\n\nGo here https://getfedora.org/en/cloud/download/ and download a box of you choice - libvirt or virtualbox.\n\n```\nsudo vagrant box add fedora-cloud-23 \u003curl\u003e\nsudo vagrant init fedora-cloud-23\nsudo vagrant up\nsudo vagrant ssh\n```\n\n### FreeBSD\n\nIf you are using virtualbox, you are good to go with \n\n```\nsudo vagrant init freebsd/FreeBSD-10.2-RELEASE\nsudo vagrant up\nsudo vagrant ssh\n```\n\nIf you are using libvirt, you'll have to mutate the box\n\n```\nsudo vagrant plugin install vagrant-mutate\nsudo vagrant box add freebsd/FreeBSD-10.2-RELEASE\nsudo vagrant mutate freebsd/FreeBSD-10.2-RELEASE libvirt\nsudo vagrant init freebsd/FreeBSD-10.2-RELEASE --provider libvirt\nsudo vagrant up\nsudo vagrant ssh\n```\n\n### Get rootfs\n\n#### Fedora\n\n```\ncurl -O https://kojipkgs.fedoraproject.org//packages/Fedora-Docker-Base/25/20170221.0/images/Fedora-Docker-Base-25-20170221.0.x86_64.tar.xz\ntar xJf Fedora-Docker-Base-25-20170221.0.x86_64.tar.xz\nmkdir rootfs\ncd rootfs\ntar xf ../5486f867eebad72e716d0c4ed1c278fbc6324f05315a0594738dc06e35e7f7ca/layer.tar\ncd ~\n```\n\n#### FreeBSD\n\n```\nfetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/10.1-RELEASE/base.txz\nmkdir rootfs\ncd rootfs\ntar xJf base.txz\ncd ~\n```\n##Demos\n\n### chroot\n\nIn Fedora box\n\n```\nsudo chroot rootfs/\nmore /etc/os-release | grep PRETTY\n```\n\n### BSD Jails\n\n```\nuname -a\nsudo vi /etc/jail.conf\nsudo jail -c installfest\nuname -a\n#more /etc/sysctl.conf\n```\n\n### LXC\n\n```\nsudo dnf -y install lxc lxc-extra lxc-templates\nsudo lxc-create -n test -P rootfs/ -t none\nsudo lxc-start -n test -- bash\n```\n\n### systemd-nspawn\n\n```\nsudo systemd-nspawn -D rootfs/ bash\n```\n\n### Docker\n\nEverybody knows this, right?;)\n\n### runc\n\n```\nsudo dnf -y install runc\n\nrunc spec\nmore config.json\nsudo runc start some-container\n```\n### Namespaces\n\n#### Mount\n\n```\nmkdir /tmp/test\nsudo unshare -m bash\nmount --bind /tmp/test /media/\necho \"Hello World\" \u003e /media/hello.txt\nmount | grep media\nmore /media/hello.txt\n```\n\nIn second terminal sshed to the VM try\n\n```\nmount | grep media\nmore /media/hello.txt\nmore /tmp/test/hello.txt\n```\n\n#### UTS\n\n```\nsudo unshare -u bash\nhostname\nsysctl -q -w kernel.hostname=\"installfest\"\n```\n\nIn second terminal sshed to the VM try\n\n```\nhostname\n```\n\n#### IPC\n\n```\nsudo unshare -i bash\nipcs\nipcmk -M 20\nipcs\n```\n\nIn second terminal sshed to the VM try\n\n```\nipcs\n```\n\n#### PID\n\n```\nsudo unshare -p --fork bash -c 'sleep 100000 \u0026\nbash'\nps\n```\n\nWhaaat? How come it's not 1 and 2, but some crazy number? Because ps uses `/proc`\n\n```\nsudo unshare -p --fork --mount-proc bash -c 'sleep 100000 \u0026\nbash'\nps aux\n```\n\nBetter, in second terminal sshed to the VM try\n\n```\nps aux | grep sleep 1000\n```\n\n#### Network\n\n```\nsudo unshare -n bash\nip a\n```\n\n#### User\n\n```\nunshare -U -r\necho \"Ahoj\" \u003e aaa\nls -la aaa\n```\n\nIn second terminal sshed to the VM try\n\n```\nls -la aaa\n```\n\n#### Pivot Root\n\n```\nsudo unshare -m -p -i -n -u --fork --mount-proc bash\nroot=/home/vagrant/rootfs\nmkdir $root/.pivot\nmount --bind $root $root\npivot_root $root $root/.pivot\ncd /\nexec bash\nrpm -q bash\n```\n\n### Cgroups\n\n```\nsudo sytemd-cgls\nsudo systemd-nspawn --slice=test.slice -D rootfs/ bash\nsudo systemd-cgls | grep -A 1 -B 1 machine-rootfs\\.scope\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvpavlin%2Finstallfest2016","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvpavlin%2Finstallfest2016","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvpavlin%2Finstallfest2016/lists"}