Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Docker stripping Environment Variable Quotes

john April 11, 2020

Docker is stripping quotation marks around my env vars but I need them.

My input via UI is:

TAG_RULE='[{ "foo": [ "value" ], "tags": [{ "key": "key1", "value": "value1"}, { "key": "key2", "value": "value2"}]}]' ANNOTATION_TYPE="annotation type here..."
/usr/bin/docker run --volume /opt/bamboofiles/xml-data/build-dir/FP-PLAN-SKE:/data --workdir /data --rm -e TAG_RULE=[{ "foo": [ "value" ], "tags": [{ "key": "key1", "value": "value1"}, { "key": "foo2", "value": "value2"}]}] -e ANNOTATION_TYPE=annotation type here... myOrg/myContainer:v1

 Which obviously fails due to the spaces in the env vars...

I've tried mixing single quotes and double quotes. I've also tried escaping them but they all get removed.

What's the solution here?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events