Docker Community Forums

Share and learn in the Docker community.

Environment file location for "docker service create --env-file"

I am pretty new to Docker, and this looks like a very simple question, that I do not seem to find an answer for, unless I am missing something obvious. I am creating a service using the following command:

docker service create --env-file host.env …

The swarm consists of Windows nodes only, but it is possible Linux nodes will join in the future. Where do I put host.env file so I do not have to hardcode the path?

I am a little bit surprised that such a simple question does not have an answer yet.