Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,366,248
Community Members
 
Community Events
168
Community Groups

Docker stripping Environment Variable Quotes

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

Atlassian Community Events