How to escape double and single quotes in YAML within the same string

> starts a block scalar, in which you do not need to escape anything at all (and there are no escape sequences processed). So assuming you want single quotes around your JSON-like value, just do: – name: Set environment variable command: > export EXTRA_CONFIG='{“client”: {“subscriptions”: [“DIND-Worker”], “cluster”: “internal”}}’ Edit: Also be aware that a folded … Read more

How can I escape a $ dollar sign in a docker compose file?

You can use a $$ (double-dollar sign) when your configuration needs a literal dollar sign. You are hitting the docker-compose variable substitution, which is well documented here: Both $VARIABLE and ${VARIABLE} syntax are supported. Extended shell-style features, such as ${VARIABLE-default} and ${VARIABLE/foo/bar}, are not supported. You can use a $$ (double-dollar sign) when your configuration … Read more

tech