-
Bug
-
Resolution: Unresolved
-
Minor
Both of these attempts results in the error
"docker build" requires exactly 1 argument.
I believe this to be a bug since the docker.build works fine without any arguments.
stage('Build image') { steps{ sh """docker build -t my-image:dev --build-arg VAULT_TOKEN=${VAULT_TOKEN} .""" } }
stage('Build image') { steps{ docker.build "my-image:dev", "--build-arg VAULT_TOKEN=${VAULT_TOKEN} ." } }
When looking at the pipeline output I can see the trailing "." is being removed from the docker.build step
+ docker build -t my-image:dev --build-arg VAULT_TOKEN=<token> "docker build" requires exactly 1 argument. See 'docker build --help'. Usage: docker build [OPTIONS] PATH | URL | -