Skip to content

Commit

Permalink
Add missing dmidecode binary to CDI HTTP import server container.
Browse files Browse the repository at this point in the history
entrypoint.sh was improved to copy executables from the right path.

Signed-off-by: Igor Bezukh <[email protected]>
  • Loading branch information
enp0s3 committed Apr 16, 2020
1 parent e650eb4 commit 0a183f3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
8 changes: 8 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,14 @@ http_file(
],
)

http_file(
name = "which",
sha256 = "a7557e0f91d7d710bb7cd939d4263ebbc84aeec9594d7dc4e062ace4b090e3b6",
urls = [
"https://dl.fedoraproject.org/pub/archive/fedora/linux/releases/28/Everything/x86_64/os/Packages/w/which-2.21-8.fc28.x86_64.rpm",
],
)

# some repos which are not part of go_rules anymore
go_repository(
name = "com_github_golang_glog",
Expand Down
1 change: 1 addition & 0 deletions images/cdi-http-import-server/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ rpm_image(
"@libaio//file",
"@e2fsprogs//file",
"@dmidecode//file",
"@which//file",
],
}),
)
Expand Down
9 changes: 5 additions & 4 deletions images/cdi-http-import-server/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ elif [ -n "$AS_EMPTY" ]; then
touch /tmp/healthy
bash expose-as-iscsi.sh "${IMAGE_PATH}/disk.raw"
else
# Expose qemu-guest-agent via nginx server
cp /usr/bin/qemu-ga /usr/share/nginx/html/
cp /usr/bin/stress /usr/share/nginx/html/
cp /usr/bin/dmidecode /usr/share/nginx/html/
# Expose binaries via nginx server
for executable in qemu-ga stress dmidecode; do
cp $(which $executable) /usr/share/nginx/html/
done

/usr/sbin/nginx
fi

0 comments on commit 0a183f3

Please sign in to comment.