-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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
Failing to create a docker image with runAsRoot #325308
Comments
Could you please prepare a minimal (or, at least, more reduced) test case, this is a bit too much to work with. |
sorry for the complexity, that repo has quite a few machines and bells and whistles. Tried to reduce it some, still seeing the same behavior when i run the below with this new repo. Steps to reproduce the behavior:
|
Thanks! I think this is the same issue as: docker/for-linux#1443 It looks like it's a bug in the Linux kernel which we can at best try to work around, and none of the work arounds fix the problem completely :/ |
Here is a kernel log excerpt from when it happens (i.e.
|
One way to completely avoid this problem is to use another implementation of OverlayFS. I opened #329696 which adds a new option, |
Alright awesome. I see some workarounds there, I'll see if any of them work and then switch to the new option once this is merged |
Note that those workarounds need to be applied to the VM that dockerTools creates and runs, not the host machine running
It would help if you could test that the patch fixes the problem you were seeing in the first place, and make a note on the pull request to that effect. |
Oh yeah no problem. Let me try it after work on both machines. |
still failing to build but its getting inside the VM. Does the VM not have internet connectivity? That said, I'm definitely getting inside the VM so that's awesome error: builder for '/nix/store/2p7waij0cgdp8s200cnmcdy4mzidk872-docker-layer-nextcloud-custom.drv' failed with exit code 100;
last 25 log lines:
> Ign:3 http://deb.debian.org/debian-security bookworm-security InRelease
> Err:1 http://deb.debian.org/debian bookworm InRelease
> Temporary failure resolving 'deb.debian.org'
> Err:2 http://deb.debian.org/debian bookworm-updates InRelease
> Temporary failure resolving 'deb.debian.org'
> Err:3 http://deb.debian.org/debian-security bookworm-security InRelease
> Temporary failure resolving 'deb.debian.org'
> Reading package lists... Done
> W: Failed to fetch http://deb.debian.org/debian/dists/bookworm/InRelease Temporary failure resolving 'deb.debian.org'
> W: Failed to fetch http://deb.debian.org/debian/dists/bookworm-updates/InRelease Temporary failure resolving 'deb.debian.org'
> W: Failed to fetch http://deb.debian.org/debian-security/dists/bookworm-security/InRelease Temporary failure resolving 'deb.debian.org'
> W: Some index files failed to download. They have been ignored, or old ones used instead.
> + /usr/bin/apt-get install -y --no-install-recommends ffmpeg ghostscript libmagickcore-6.q16-6-extra procps smbclient supervisor
> Reading package lists... Done
> Building dependency tree... Done
> Reading state information... Done
> Package ghostscript is not available, but is referred to by another package.
> This may mean that the package is missing, has been obsoleted, or
> is only available from another source
>
> E: Unable to locate package ffmpeg
> E: Package 'ghostscript' has no installation candidate
> E: Unable to locate package smbclient
> E: Unable to locate package supervisor
> [ 23.261455] reboot: Power down
For full logs, run 'nix log /nix/store/2p7waij0cgdp8s200cnmcdy4mzidk872-docker-layer-nextcloud-custom.drv'. |
No, input-addressed derivations don't have network connectivity, as that would allow them to be impure. Content-addressed derivations can access the Internet, but they are expected to produce the exact same output every time, which might not be feasible in the case of a VM image that installs packages with |
Yeah that's not a problem. I have the sandbox to work off of and can figure it out from there hopefully. Thank you for all the help |
Describe the bug
I'm trying to translate the nextcloud docker apache image link to source to a
dockerTools.buildImage
setup. I'm trying to use the runAsRoot functionality to do some of the apt-get steps and such (as this is an Ubuntu-based image), but I'm not even able to get to the point where the script runs. I believe it's failing at this line of the VM setup script.Steps To Reproduce
Steps to reproduce the behavior:
sudo nix build .#nixosConfigurations.palatine-hill.config.system.build.toplevel --verbose
Expected behavior
sudo nix build .#nixosConfigurations.palatine-hill.config.system.build.toplevel --verbose
Additional context
Link to file creating the image:
https://github.com/RAD-Development/nix-dotfiles/blob/feature/docker-palatine-hill-migration/systems/palatine-hill/docker/nextcloud-image/default.nix
Builder Logs:
Notify maintainers
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Note on the nix version, I've tried this on 2.23 and 2.18 and got the same result.
Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: