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

ARGs aren't set when running DOCKERFILE #1684

Closed
AndrewWSHenry opened this issue Sep 18, 2024 Discussed in #1683 · 3 comments
Closed

ARGs aren't set when running DOCKERFILE #1684

AndrewWSHenry opened this issue Sep 18, 2024 Discussed in #1683 · 3 comments

Comments

@AndrewWSHenry
Copy link

Discussed in #1683

Originally posted by AndrewWSHenry September 18, 2024
hi,

I have not been able to build the kube-bench container using the instructions for "Running CIS benchmark in an EKS cluster" https://github.com/aquasecurity/kube-bench/blob/main/docs/running.md#running-cis-benchmark-in-an-eks-cluster. I have run the docker build command on Ubuntu 24.04 and OpenSUSE LEAP 15.6 and run into the same problem of the KUBECTL_VERSION ARG not being set/available. causing the wget to error.

The instructions don't mention a need to set those values and a brief look seems to suggest that the makefile run by the dockerfile should be setting those values. Just wondering if anyone is aware of a reason why the KUBECTL_VERSION arg has no value?

This is the relevant output.

Dockerfile:14

12 | # Add kubectl to run policies checks
13 | ARG KUBECTL_VERSION TARGETARCH
14 | >>> RUN wget -O /usr/local/bin/kubectl "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/${TARGETARCH}/kubectl"
15 | RUN wget -O kubectl.sha256 "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/${TARGETARCH}/kubectl.sha256"
16 | # Verify kubectl sha256sum

ERROR: failed to solve: process "/bin/sh -c wget -O /usr/local/bin/kubectl "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/${TARGETARCH}/kubectl\"" did not complete successfully: exit code: 8

@mozillazg
Copy link
Collaborator

@AndrewWSHenry Thanks for reporting. We should add a default value for the KUBECTL_VERSION arg in the Dockerfile.
Feel free to send a pull request for this. Thanks!

@afdesk
Copy link
Collaborator

afdesk commented Sep 30, 2024

#1648 should fix this issue.
@AndrewWSHenry could you confirm that It's OK for you? thanks!

@afdesk
Copy link
Collaborator

afdesk commented Oct 10, 2024

closed in favor of #1648 and was confirmed #1683 (reply in thread)

please feel free to reopen this issue if it appears again.

thanks!

@afdesk afdesk closed this as completed Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants