franklinsing
franklinsing

Reputation: 33

Writing a .env file to include OAuth credentials for Docker

I need to write an env file to include the following: oauth client id, client secret, and callback URL

I've never written an env file before, and I'm not sure what the tags (or keys) for the above three would be. I understand that I'm getting the values from my OAuth application. I also understand how to execute the env file with Docker. Please help!

Upvotes: 0

Views: 381

Answers (1)

user2915097
user2915097

Reputation: 32166

Put in your env file your keys and values

example, I have a file my-env

$ more my-env 
abc=123
def=456

I launch a docker container, and want to see the env

$ docker run --env-file my-env -it alpine env
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=7500318c8570
TERM=xterm
abc=123
def=456
HOME=/root
$

You have the online help for

docker run

that shows

--env-file value              Read in a file of environment variables (default [])

Upvotes: 1

Related Questions