Bug 15413 - Docker build or Podman build fails from Yocto and seen no issue when run manually
Summary: Docker build or Podman build fails from Yocto and seen no issue when run manu...
Status: RESOLVED INVALID
Alias: None
Product: Infrastructure General
Classification: Infrastructure
Component: infrastructure-general (show other bugs)
Version: unspecified
Hardware: x86 x86_64
: Undecided normal
Target Milestone: ---
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2024-02-26 05:18 UTC by mohan08426
Modified: 2024-02-29 16:15 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments
/usr/bin/newuidmap is owned by user nobody when running yocto bitbake recipe. (42.68 KB, image/png)
2024-02-26 05:18 UTC, mohan08426
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description mohan08426 2024-02-26 05:18:26 UTC
Created attachment 5018 [details]
/usr/bin/newuidmap is owned by user nobody when running yocto bitbake recipe.

Docker build or Podman build fails from Yocto and seen no issue when run manually. Below are the error logs.
Log data follows:
| DEBUG: Executing shell function do_compile
| Deleting any existing *tar.gz files
| Building img_ui from
| time="2024-02-13T08:51:23Z" level=error msg="invalid internal status, try resetting the pause process with "/usr/bin/podman system migrate": command required for rootless mode with multiple IDs: exec: "newuidmap": executable file not found in $PATH"
| WARNING: /home/build/tmp/work/corei7-64-poky-linux/ui-docker/1.0-r0/temp/run.do_compile.48173:156 exit 1 from 'docker build -t img_ui -f /home/build/tmp/work/corei7-64-poky-linux/ui-docker/1.0-r0/Dockerfile /home/build/tmp/work/corei7-64-poky-linux/ui-docker/1.0-r0'
| WARNING: Backtrace (BB generated script):
| containers/podman-desktop#1: do_compile, /home/build/tmp/work/corei7-64-poky-linux/ui-docker/1.0-r0/temp/run.do_compile.48173, line 156
| containers/podman-desktop#2: main, /home/build/tmp/work/corei7-64-poky-linux/ui-docker/1.0-r0/temp/run.do_compile.48173, line 172

I see /usr/bin/newuidmap is owned by user nobody instead of root while running yocto bitbake recipe. is this causing issue ?

Hardware: x86_64 desktop pc
OS: RHEL 8.9
Comment 1 Randy MacLeod 2024-02-29 15:41:16 UTC
We don't usually take meta-virt bugs in this bugzilla so please post on the meta-virt email list.

I've CCed Bruce and Mingli who work on docker and podman from time to time.
Comment 2 Bruce Ashfield 2024-02-29 16:15:39 UTC
You can't run "docker build" or "podman build" directly in a recipe.

They require permissions and utilities that can't run within the restricted pseudo controlled environment.

I have ongoing efforts to cross install containers by working through these low level issues. While those fixes/features won't target a "build" operation, they may help them in the long run.