INNER CODE UNIT · Python
_quote_docker_env_value
omnirexflora-labs/omnicoreagent · src/omnicoreagent/serve/cli.py:387
def _quote_docker_env_value(value: str) -> str:
"""Quote a Dockerfile ENV value while preserving ordinary path characters."""
escaped = value.replace("\\", "\\\\").replace('"', '\\"')
return f'"{escaped}"'
# Credential files, in any folder ("**/" because Docker applies a bare pattern
# only at the build context's root: the 0.5.0rc5 gate, an agent's app/.env went
# into the image).
_CREDENTIAL_PATTERNS = (
"**/.env",
"**/.env.*",
"**/*.pem",
"**/*.key",
"**/*.p12",
"**/id_rsa*",
"**/id_ed25519*",
"**/.netrc",