Say for example we wanted to write the env from the host to Docker container, one way would be to use a temp file:
env > env_file && docker run --env-file env_file image_name
to avoid a temp file, maybe we could use process substitution, but obviously this won't quite work:
docker run --env-file <(env) image_name
is there some way to write the env output somehow without have to use a temp file?
The error I get is:
$ docker run --env-file <(env) redis docker: poorly formatted environment: variable 'echo "copied to clipboard";' has white spaces. See 'docker run --help'.