-
Notifications
You must be signed in to change notification settings - Fork 3.9k
dockerd: skip copy nested binaries #30288
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
Open
AndyChiang888
wants to merge
1
commit into
openwrt:master
Choose a base branch
from
AndyChiang888:dockerd
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+48
−1
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
| From: Andy Chiang <AndyChiang_git@outlook.com> | ||
| Date: Sun, 16 Aug 2026 22:50:48 +0700 | ||
| Subject: [PATCH] skip copy nested binaries | ||
|
|
||
| This script copies containerd, containerd-shim-runc-v2, ctr, runc, | ||
| docker-init, rootlesskit, dockerd-rootless.sh, and dockerd-rootless-setuptool.sh | ||
| into the `$dir` directory, which is unnecessary for OpenWrt. Moreover, | ||
| if the host is missing any one of these files, cp will fail and cause an error. | ||
|
|
||
| Fixes: | ||
| ``` | ||
| Copying nested executables into bundles/binary-daemon | ||
| cp: cannot stat '': No such file or directory | ||
| make[3]: *** [Makefile:166: /home/runner/work/Build/Build/openwrt/build_dir/target-x86_64_musl/dockerd-29.6.1/.built] Error 1 | ||
| ``` | ||
|
|
||
| Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com> | ||
| --- | ||
| hack/make/binary-daemon | 16 +--------------- | ||
| 1 file changed, 1 insertion(+), 15 deletions(-) | ||
|
|
||
| --- a/hack/make/binary-daemon | ||
| +++ b/hack/make/binary-daemon | ||
| @@ -2,21 +2,7 @@ | ||
| set -e | ||
|
|
||
| copy_binaries() { | ||
| - local dir="${1:?}" | ||
| - | ||
| - # Add nested executables to bundle dir so we have complete set of | ||
| - # them available, but only if the native OS/ARCH is the same as the | ||
| - # OS/ARCH of the build target | ||
| - if [ "$(go env GOOS)/$(go env GOARCH)" != "$(go env GOHOSTOS)/$(go env GOHOSTARCH)" ]; then | ||
| - return | ||
| - fi | ||
| - if [ ! -x /usr/local/bin/runc ]; then | ||
| - return | ||
| - fi | ||
| - echo "Copying nested executables into $dir" | ||
| - for file in containerd containerd-shim-runc-v2 ctr runc docker-init rootlesskit dockerd-rootless.sh dockerd-rootless-setuptool.sh; do | ||
| - cp -f "$(command -v "$file")" "$dir/" | ||
| - done | ||
| + return | ||
| } | ||
|
|
||
| [ -z "$KEEPDEST" ] && rm -rf "$DEST" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.