nix-installer icon indicating copy to clipboard operation
nix-installer copied to clipboard

Not working on ostree native containers

Open queeup opened this issue 1 year ago • 5 comments

I am trying to build my own Silverblue image and install Nix while building container my self. The problem is while trying to install on container build time, It is complaning about systemd. In silverblue ostree native container, systemd is not active on the image itself.

systemd was not active.

If it will be started later consider, passing `--no-start-daemon`.

To use a `root`-only Nix install, consider passing `--init none`.

As I can see there is no --no-start-daemon & --init none options with ostree install.

Can be reproduced with building this Dockerfile/Containerfile:

ARG FEDORA_MAJOR_VERSION=39

FROM quay.io/fedora/fedora-silverblue:${FEDORA_MAJOR_VERSION}

RUN curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install ostree --no-confirm

RUN ostree container commit

Some info about ostree native containers:

  • https://coreos.github.io/rpm-ostree/container/

queeup avatar Jan 04 '24 20:01 queeup

Let me add @Hofer-Julian to this issue.

queeup avatar Jan 04 '24 21:01 queeup

Unfortunately our OSTree solution requires the use of systemd units to manage mounts. We'd need to come up with a new solution to get it to work on systemd-less containers.

Hoverbear avatar Jan 05 '24 19:01 Hoverbear

I know ostree nix need systemd to work. This containers is booting with silverblue and there is systemd after boot process but on the build stage there is no systemd. Thats the problem. What I was looking for install with "--no-start-daemon" option for ostree. That option is not implemented to ostree yet.

queeup avatar Jan 06 '24 23:01 queeup

That is good context, thanks!

Hoverbear avatar Jan 09 '24 17:01 Hoverbear