Skip to content

Environment variables with an equals sign are not available in linked containers #12763

@squarejaw

Description

@squarejaw

I'm trying to access an environment variable containing an equals sign in a linked container.

Example:

$ docker run -i -t --rm --name foo -e "FOO=BAR" -e "BAZ=QUX=QUUX" ubuntu /bin/bash 
root@073ecccb5a67:/# echo $FOO
BAR
root@073ecccb5a67:/# echo $BAZ
QUX=QUUX

Here is the result when I create a linked container in a separate terminal:

$ docker run -i -t --link foo:foo ubuntu /bin/bash
root@6f8edb5fbf66:/# echo $FOO_ENV_FOO
BAR
root@6f8edb5fbf66:/# echo $FOO_ENV_BAZ

root@6f8edb5fbf66:/# 

Am I missing some special handling for the equals sign?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions