-
Notifications
You must be signed in to change notification settings - Fork 11
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
bug: Fedora distrobox image doesn't setup userspace with docker properly #145
Comments
Yeah you somehow got the old nightly build. There was an issue where the wrong binary got packaged into the image. I thought I got rid of that image. Mind trying to install the latest version? We're on v0.8.3 now and that particular code no longer exists cause I kept running into that specific issue. |
Thanks @gmpinder , trying that now. Might be something I'm doing wrong, but I'm getting a different error now on
The Full
Full
|
I had initially added distrobox installation instructions to the website (see [here](blue-build/website#45), but it has been suggested that the CLI readme is a more natural place for them. I have tested the distrobox installation method and procedures on my home machine and aside from an odd bug (see #145) everything is working.
Mind using trace logging with -vv? I've not seen this error before. The trace logs should show the exact args being used for docker |
EDIT: everything before
|
Ah, my day has come full circle... I ran
|
@gmpinder One idea, is there a way to force bluebuild to use podman instead of docker? Today has left me confused as shit about how docker is supposed to work in the ublueos ecosystem, I've just been using podman/distrobox for everything. Edit: Sorry for the ping, it's not that big of a rush. Thanks for the quick response/help. |
Right now there isn't but we do have an issue for adding that in #143 You could also try the alpine image |
I've also rebuilt and pushed the v0.8.1 images so that other users don't run into that awful nightly build bug |
Thanks, that's a good idea. Trying the alpine image, it looks like it's working (though, I needed to use I thought I had ruled out these problems earlier, but I think the
Further reference for rootless podman: I should have some time to look into this tomorrow. |
He said, lying. I think the fix for the userspace situation would look something like this: diff --git a/Earthfile b/Earthfile
index 4476f48..3dba633 100644
--- a/Earthfile
+++ b/Earthfile
@@ -73,6 +73,9 @@ blue-build-cli:
podman \
skopeo
+ # Do podman, docker, and systemd changes in the fedora toolbox
+ # Or just podman I guess?
+
COPY +cosign/cosign /usr/bin/cosign
COPY (+install/bluebuild --BUILD_TARGET="x86_64-unknown-linux-gnu") /usr/bin/bluebuild
@@ -91,7 +94,24 @@ blue-build-cli-alpine:
BUILD +install --BUILD_TARGET="x86_64-unknown-linux-musl"
- RUN apk update && apk add buildah podman skopeo fuse-overlayfs
+ # sample podman changes for alpine
+ # See https://distrobox.it/useful_tips/#using-podman-inside-a-distrobox
+ RUN apk update && apk add buildah podman skopeo fuse-overlayfs crun
+
+ # this doesn't actually make sense, $USER doesn't exist yet...
+ RUN usermod --add-subuids 10000-65536 $USER && usermod --add-subgids 10000-65536 $USER
+ RUN cat << EOF > /etc/containers/containers.conf
+ [containers]
+ netns="host"
+ userns="host"
+ ipcns="host"
+ utsns="host"
+ cgroupns="host"
+ log_driver = "k8s-file"
+ [engine]
+ cgroup_manager = "cgroupfs"
+ events_logger="file"
+ EOFRUN
COPY +cosign/cosign /usr/bin/cosign
COPY (+install/bluebuild --BUILD_TARGET="x86_64-unknown-linux-musl") /usr/bin/bluebuild
While I'd love to do try these changes out myself, I don't actually know what I'm doing in rust/earthly and I don't really have the time to figure it out just now -- maybe next time. For now, I'm at least able to do rootful podman in an alpine distrobox and that's been helpful. Thanks again for the help @gmpinder |
Or, more simply, do the host's install of podman/docker trick from https://distrobox.it/useful_tips/#using-hosts-podman-or-docker-inside-a-distrobox instead: diff --git a/Earthfile b/Earthfile
index 4476f48..3dba633 100644
--- a/Earthfile
+++ b/Earthfile
@@ -91,7 +94,24 @@ blue-build-cli-alpine:
BUILD +install --BUILD_TARGET="x86_64-unknown-linux-musl"
RUN apk update && apk add buildah podman skopeo fuse-overlayfs
+ RUN ln -s /usr/bin/distrobox-host-exec /usr/local/bin/podman
+ # maybe /usr/bin/podman instead b/c can't write to /usr/local
COPY +cosign/cosign /usr/bin/cosign
COPY (+install/bluebuild --BUILD_TARGET="x86_64-unknown-linux-musl") /usr/bin/bluebuild
|
Just a heads up, I removed the use of |
Current Behavior
The last several times I have run a successful
bluebuild build <recipe>
command, the process ends with something like following behavior (in this case, the image name iscombined-nvidia
):The terminal hangs at this point without the process completing. On pressing
<CTRL-C>
:Expected Behavior
The
bluebuild build
command should exit gracefully (returnexit 0
or similar) and restore control of the shell to the user.Additional context/Screenshots
The report below was generated from inside of the bluebuild cli distrobox image using
bluebuild bug-report
.Possible Solution
N/A
Environment
Shell
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Rust
Recipe:
This issue has happened on all of my custom recipes, but here is one particular example:
The text was updated successfully, but these errors were encountered: