Docker Community Forums

Share and learn in the Docker community.

Service create -e option


(Charliekumpwf) #1

Expected behavior

Have a file of env variables to pass to ‘docker service create’

Actual behavior

-e filename no longer seems to work

Information

Just a question really, is it expected behavior to be able to pass a file to the ‘-e’ option in service create or are we suppose to define the list of key=value pairs?


(David Sheets) #2

Hello,

I’m not sure when docker service create -e used to take a filename (perhaps in an RC?) but I don’t believe it does in 1.12 as released. See https://docs.docker.com/engine/reference/commandline/service_create/#/setting-environment-variables-e-env.

Hope this helps,

David


(Charliekumpwf) #3

Yeah, it was a RC. No worries, I scripted out building the command from the file and it works just fine :). Thanks for the reply!