diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 75dc8051bc..fa099f2415 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -86,6 +86,6 @@ jobs: client: "image-release" image_name: "quay.io/${{ github.repository_owner }}/kubescape" image_tag: "v2.0.${{ github.run_number }}" - support_platforms: false + support_platforms: true cosign: true secrets: inherit diff --git a/.github/workflows/build_dev.yaml b/.github/workflows/build_dev.yaml index be9acb3415..18f501540b 100644 --- a/.github/workflows/build_dev.yaml +++ b/.github/workflows/build_dev.yaml @@ -21,6 +21,6 @@ jobs: client: "image-dev" image_name: "quay.io/${{ github.repository_owner }}/kubescape" image_tag: "dev-v2.0.${{ github.run_number }}" - support_platforms: false + support_platforms: true cosign: true secrets: inherit diff --git a/build.py b/build.py index c33291126a..9ddd46bcf2 100644 --- a/build.py +++ b/build.py @@ -57,7 +57,7 @@ def main(): if client_name: ldflags += " -X {}={}".format(client_var, client_name) - build_command = ["go", "build", "-tags=static", "-o", ks_file, "-ldflags" ,ldflags] + build_command = ["go", "build", "-buildmode=pie", "-tags=static", "-o", ks_file, "-ldflags" ,ldflags] print("Building kubescape and saving here: {}".format(ks_file)) print("Build command: {}".format(" ".join(build_command))) diff --git a/build/Dockerfile b/build/Dockerfile index 8b5c144b3b..360efa76aa 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -12,7 +12,7 @@ ENV CGO_ENABLED=1 # Install required python/pip ENV PYTHONUNBUFFERED=1 -RUN apk add --update --no-cache python3 git openssl-dev musl-dev gcc make cmake pkgconfig && ln -sf python3 /usr/bin/python +RUN apk add --update --no-cache python3 gcc make git libc-dev binutils-gold cmake pkgconfig && ln -sf python3 /usr/bin/python RUN python3 -m ensurepip RUN pip3 install --no-cache --upgrade pip setuptools diff --git a/httphandler/build.py b/httphandler/build.py index ee516c1cf0..795e561724 100644 --- a/httphandler/build.py +++ b/httphandler/build.py @@ -56,7 +56,7 @@ def main(): if client_name: ldflags += " -X {}={}".format(client_var, client_name) - build_command = ["go", "build", "-tags=static", "-o", ks_file, "-ldflags" ,ldflags] + build_command = ["go", "build", "-buildmode=pie", "-tags=static", "-o", ks_file, "-ldflags" ,ldflags] print("Building kubescape and saving here: {}".format(ks_file)) print("Build command: {}".format(" ".join(build_command)))