-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add script to extract client binary from docker image
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
- Loading branch information
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,28 @@ | ||
#!/bin/bash | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright (c) 2022 Dell Inc, or its subsidiaries. | ||
|
||
set -euxo pipefail | ||
|
||
# docker compose plugin | ||
command -v docker-compose || { shopt -s expand_aliases && alias docker-compose='docker compose'; } | ||
|
||
# let everything start | ||
sleep 5 | ||
|
||
# print for debug | ||
docker-compose ps | ||
|
||
# run image and copy binary | ||
docker run --rm -it --platform=linux/arm64 -v /tmp:/tmp ghcr.io/opiproject/opi-sztp-client:main cp /opi-sztp-agent /tmp/ | ||
|
||
# test file architecture is indeed ARM | ||
file /tmp/opi-sztp-agent | ||
|
||
# you can scp it into DPU now... | ||
echo ================================== | ||
echo You can now SCP pem files to the real DPU | ||
echo sshpass -p dpupass ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=3 /tmp/opi-sztp-agent dpuser@[dpu-ip]:~ | ||
echo ================================== | ||
|
||
echo "DONE" |
File renamed without changes.