-
Notifications
You must be signed in to change notification settings - Fork 2
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
local build + set platform to linux/amd64 #10
base: main
Are you sure you want to change the base?
Conversation
until [ -z $1 ]; do | ||
case $1 in | ||
--version ) | ||
version="$2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can lead to UB in case that there is flag --version
but there is no value for it.
consider adding this validation:
if [ -n "$2" ]; then
version="$2"
fi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If no value you will get usage text:
version is missing
Usage: ./build_local.sh
[--version]
required arguments:
--version Specify the version for image
build_local.sh
Outdated
|
||
echo "Building $image:latest docker image" | ||
eval $(minikube docker-env) | ||
docker build --platform linux/amd64 --build-arg PRODUCT_VERSION="$version" --load -t $image:latest . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove -platform linux/amd64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
No description provided.