On my host machine I run the following:
export test_1="Hello"
export test_2="There"
Starting Docker container:
docker run -it -e test* centos
The env variables are not available in the container. Is what I'm trying to achieve possible?
You can try to filter your environment variables like
env | grep ^test > env.list
and then use env-file docker option to pass all variables at once:
docker run -it --env-file env.list centos