Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to make an image with docker build inside #1432

Unanswered
DrissiReda asked this question in Q&A
Discussion options

I am trying to install Dataiku using bootc instead of a VM. The end goal is to run the resulting qcow2 on qemu/kvm.

This requires a couple of docker build commands inside of the qcow2 since the resulting VM will need to have docker images loaded in the container runtime.

It seems like this isn't supposed to work in bootc. Because I'm using this minimalist Dockerfile:

FROM quay.io/fedora/fedora-bootc:42
# Install Docker and Python
RUN microdnf install -y \
 docker \
 && microdnf clean all
RUN systemctl enable docker.service
WORKDIR /opt
COPY Dockerfile.tmp /opt/Dockerfile
RUN docker build -t sample-image .

The Dockerfile.tmp isn't important it's just a FROM alpine and apk add curl

This gives the error:

------ 
 > [6/7] RUN docker build -t sample-image .:
0.151 ERROR: mkdir /root: file exists
------
Dockerfile:16
--------------------
 14 | COPY Dockerfile.tmp /opt/Dockerfile
 15 | 
 16 | >>> RUN docker build -t sample-image .
 17 | 
 18 | # Optional: Create a dummy file to indicate build success
--------------------
ERROR: failed to solve: process "/bin/sh -c docker build -t sample-image ." did not complete successfully: exit code: 1

This is quite cryptic, but I imagine it is due to the fact that the socket isn't loaded in bootc during build. I also tried buildah which doesn't work either maybe because it needs user namespace which is not available in bootc building runtime.

Is there any way to do what I need to do?

The option of building the image outside the bootc then loading its layers isn't much of an option either, because building said image requires the entire context and that's not something I want on the host.

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /