Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

alikdolg
Copy link
Contributor

No description provided.

@alikdolg alikdolg requested a review from renanaAkeyless June 20, 2024 10:40
@alikdolg alikdolg self-assigned this Jun 20, 2024
@alikdolg alikdolg requested a review from tuvia-akeyless June 23, 2024 06:47
build.sh Show resolved Hide resolved
until [ -z $1 ]; do
case $1 in
--version )
version="$2"

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

Copy link
Contributor Author

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 .

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove -platform linux/amd64

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants