I need to run tests on Kubernetes cluster and it works with your docker image when i try on local machine as i have all the AWS config, credentials file and KUBECTL config stored on my local machine but when i try to run the same on Jenkins pipeline it fails as the docker image is not having AWS config file and KUBECTL config on the image. So as per the suggestion from this link Docker Usage — v12.0.0 - check and report on AWS service usage and limits i tried using the below command but it is unable to run kubectl commands.
+ docker run --rm --user=root -e AWS_ACCESS_KEY_ID=ABCDEFGHIJKNL
"docker run" requires at least 1 argument.
See 'docker run --help'.
Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
Run a command in a new container
I’m no expert on these things as I don’t really use AWS and docker myself, so take my suggestion with a grain of salt.
Looking at the error, the first clue is:
"docker run" requires at least 1 argument.
and the second clue is:
+ docker run --rm --user=root -e AWS_ACCESS_KEY_ID=ABCDEFGHIJKNL
I suspect the issue is the \ line continuations are actually being taken as new lines by your management tool? I’d suggest removing these \ and make your command a single long line of text.
I really don’t understand what is going on, because the error message if for docker run and the missing command.
Did you tested locally the docker image?
Maybe you need to download the 1GB image first in the AWS bucket.