{"id":23594286,"url":"https://github.com/pexmor/fedora-container-in-vm","last_synced_at":"2026-05-05T18:36:50.825Z","repository":{"id":172673599,"uuid":"204879756","full_name":"PexMor/fedora-container-in-vm","owner":"PexMor","description":"This repo is to demonstrate how to run buildah, podman and skopeo in portable VM","archived":false,"fork":false,"pushed_at":"2019-09-01T11:15:27.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-25T06:28:40.383Z","etag":null,"topics":["buildah","fedora","kvm","libvirt","podman","skopeo","vagrant"],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/PexMor.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,"zenodo":null}},"created_at":"2019-08-28T08:03:07.000Z","updated_at":"2024-09-17T10:26:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"2ab968d4-5001-4307-9c89-7d22ebacd9ec","html_url":"https://github.com/PexMor/fedora-container-in-vm","commit_stats":null,"previous_names":["pexmor/fedora-container-in-vm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PexMor/fedora-container-in-vm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PexMor%2Ffedora-container-in-vm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PexMor%2Ffedora-container-in-vm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PexMor%2Ffedora-container-in-vm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PexMor%2Ffedora-container-in-vm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PexMor","download_url":"https://codeload.github.com/PexMor/fedora-container-in-vm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PexMor%2Ffedora-container-in-vm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32663422,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["buildah","fedora","kvm","libvirt","podman","skopeo","vagrant"],"created_at":"2024-12-27T09:16:31.866Z","updated_at":"2026-05-05T18:36:50.804Z","avatar_url":"https://github.com/PexMor.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fedora VM for podman\n\n__TL;DR:__ jump into the running VM with tools ready.\n\n```bash\n# run and provision the VM\nvagrant up\n\n# enter the VM\nvagrant ssh\n```\n\n__Note:__ It is __crucial__ to have at least __1 GB__ of RAM allocated for the VM. Otherwise, you might encounter strange behaviour caused by __OOM kill__.\n\n## All-in-One Vagrant setup\n\nThis directory is a reference cloud image with container tools \n```podman```, ```skopeo``` and ```buildah```\ninstalled. This [Vagrantfile](Vagrantfile) creates a VM with ```nfs-tools``` installed so you can use the VM for independent builds with an option to share artefacts using __NFS__.\n\n\n### Test it\n\nextracted from [https://docs.fedoraproject.org/en-US/iot/buildah/](https://docs.fedoraproject.org/en-US/iot/buildah/)\n\n```bash\nbuildah from fedora\nbuildah run fedora-working-container dnf install httpd -y\necho \"\u003chtml /\u003e\" \u003eindex.html\nbuildah copy fedora-working-container index.html /var/www/html/index.html\nbuildah config --entrypoint \"/usr/sbin/httpd -DFOREGROUND\" fedora-working-container\nbuildah commit fedora-working-container fedora-myhttpd\nbuildah images\npodman run fedora-myhttpd\n```\n\n#### Step by step explained\n\n1. ```buildah from fedora``` creates __fedora-working-container__ (the actual name is shown in CLI)\n2. ```buildah run fedora-working-container dnf install httpd -y``` simple install, note the familiar ```dnf install httpd -y``` (forced install of __httpd__ aka __apache 2.4__).\n3. ```echo \"\u003chtml /\u003e\" \u003eindex.html``` make the simplest HTML page.\n4. ```buildah copy fedora-working-container index.html /var/www/html/index.html``` put created __index.html__ into proper place inside the container.\n5. ```buildah commit fedora-working-container fedora-myhttpd``` bake the container into permanent image (per user though)\n6. ```buildah images``` list the images available (you should see __fedora-httpd__ listed among them).\n7. ```podman run -p 8080:80 fedora-myhttpd``` run the container and redirect local port of __8080__ to the container port __80__ (privileged port).\n\n## Builder notes\n\nSome details that you might find useful when doing experiments with this repo and guide.\n\n### Alternative Virsh\n\nIn case you __do not have__ ```vagrant```, but only the ```virsh``` go to sub-directory [usingVirsh](usingVirsh). This directory contains few scripts that can help you to achieve the same but using __virsh__ (libvirt-bin package on Ubuntu).\n\n### Provisioning the VM\n\nThe few commands that you have to run as root ```sudo -i``` to get it working when you have vanilla __Fedora__ running somewhere. In the ```Vagrantfile``` the packages are squashed into one line.\n\n__Note:__ _If you do not need the NFS, then leave out the ```nfs-tools``` package and ```rpcbind``` service start and enable._\n\n```bash\n# switch to root account\nsudo -i\n\n# start with updating the system\nyum update -y\n\n# install semanage\nyum install policycoreutils-python-utils -y\n\n# then install the container tools\nyum install podman buildah skopeo -y\n\n# also install the NFS client\nyum install nfs-tools -y\n\n# turn on rpcbind\nsystemctl start rpcbind\nsystemctl enable rpcbind\n```\n\n### Debugging the SE Linux\n\nYou might find it useful to turn off __SE Linux__ or better-said switching it into permissive. When that done, you should then spot all issue that would block the execution as log messages.\n\n```bash\n# disable at runtime = switch permissive\nsetenforce 0\n\n# fix the context, strange labeling that was seen on F30\nsemanage fcontext -a -t container_file_t /var/lib/containers\\(/.*\\)\\?\n\n# apply it to the filesystem\nrestorecon -R /var/lib/containers\n\n# disable in config to keep it permissive after reboot\nsed -i 's/^\\s*SELINUX=.*/SELINUX=permissive/g' /etc/selinux/config\n\n# check state\nsestatus\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpexmor%2Ffedora-container-in-vm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpexmor%2Ffedora-container-in-vm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpexmor%2Ffedora-container-in-vm/lists"}