Docker Community Forums

Share and learn in the Docker community.

How to pass travis environment variables in docker container

Hello team,

I want to pass the travis environment variables like TRAVIS_PULL_REQUEST into the docker container. I tried docker run -r TRAVIS_PULL_REQUEST=${TRAVIS_PULL_REQUEST} image_name in travis script and it worked.

But I want to pass multiple env variables and I tried setting env by the running script and env file but it didn’t work.

Can someone please help me to find out the solution ?