Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of ignite #260

Open
majst01 opened this issue Oct 11, 2024 · 5 comments
Open

Get rid of ignite #260

majst01 opened this issue Oct 11, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@majst01
Copy link
Contributor

majst01 commented Oct 11, 2024

Ignite is dead and archived since almost a year.

I came across this blog post: https://mergeboard.com/blog/2-qemu-microvm-docker/ which describes howto convert a docker image to a qcow2 file and run it with firecracker or any other small and fast micro-vm tool. With the help of docker buildx (default nowadays) creating a tarball from a Dockerfile can be done like so:

DOCKER_BUILDKIT=1 docker build -f alpine.docker --output "type=tar,dest=alpine.tar" .

And converting it to qcow2:

virt-make-fs --format=qcow2 --size=+200M alpine.tar alpine-large.qcow2
qemu-img convert alpine-large.qcow2 -O qcow2 alpine.qcow2

We can replace the current docker-make based build with docker buildx bake , see: https://docs.docker.com/build/bake/

After that it should be not so difficult to run it as a VM once a kernel is provided.

@majst01 majst01 added the enhancement New feature or request label Oct 11, 2024
@majst01 majst01 self-assigned this Oct 11, 2024
@robertvolkmann
Copy link
Contributor

Do you think it would be worth removing this workaround (https://github.com/metal-stack/metal-images/blob/20240913/cmd/install.go#L157) by switching to a Docker alternative that doesn't modify /etc/resolv.conf?

@majst01
Copy link
Contributor Author

majst01 commented Oct 16, 2024

Do you think it would be worth removing this workaround (https://github.com/metal-stack/metal-images/blob/20240913/cmd/install.go#L157) by switching to a Docker alternative that doesn't modify /etc/resolv.conf?

I'm afraid, but do not understand your point

@robertvolkmann
Copy link
Contributor

robertvolkmann commented Oct 16, 2024

For example, buildah includes a flag that allows it to use the container's existing /etc/resolv.conf file, instead of generating a synthetic one like Docker does. As a result, the final tarball will contain a non-empty /etc/resolv.conf and install.go no longer has to write it.

--dns=[]
The special value none can be specified to disable creation of /etc/resolv.conf in the container by Buildah. The /etc/resolv.conf file in the image will be used without changes.

@majst01
Copy link
Contributor Author

majst01 commented Oct 16, 2024

For example, buildah includes a flag that allows it to use the container's existing /etc/resolv.conf file, instead of generating a synthetic one like Docker does. As a result, the final tarball will contain a non-empty /etc/resolv.conf and install.go no longer has to write it.

--dns=[]
The special value none can be specified to disable creation of /etc/resolv.conf in the container by Buildah. The /etc/resolv.conf file in the image will be used without changes.

But with #255 we add the ability to change the DNS server at allocation, how will buildah help here ?

@robertvolkmann
Copy link
Contributor

You're right, we will write /etc/resolv.conf anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants