The format of the env-file is explain at https://docs.docker.com/compose/env-file/.
# I'm using bash, but it applies with sh and zsh as well.
$ echo $BASH_VERSION
4.4.23(1)-release
# Create a simple env-file for testing. We're using = and ! to
# push at some corner cases.
$ echo 'THISISAVARIABLE=This is the value that even has an = sign!' > /tmp/concoction.env
$ cat /tmp/concoction.env
THISISAVARIABLE=This is the value that even has an = sign!
# Show that it is set in the environment.
$ docker run --rm --env-file=/tmp/concoction.env ubuntu env
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=c3a4e92f820e
THISISAVARIABLE=This is the value that even has an = sign!
HOME=/root
# This example is quoted twice.
# The first layer is the current shell, bash.
# The second layer is used by sh
$ docker run --rm --env-file=/tmp/concoction.env ubuntu sh -c 'echo "${THISISAVARIABLE}"'
This is the value that even has an = sign!
$