red888
red888

Reputation: 31662

what is the docker run -g switch actually doing?

Can't seem to find it in the docs, would like to understand what its actually doing. The only examples I can seem to find with this switch is for nginx -g 'daemon off' so its the magical make nginx stay running switch?

Upvotes: 1

Views: 745

Answers (1)

user3151902
user3151902

Reputation: 3176

The -g switch is actually not a docker argument, but an nginx argument.

Have a look at the docker run syntax:

$ docker run --help
Usage:  docker run [OPTIONS] IMAGE [COMMAND] [ARG...]

Everything you specify after the command (nginx in your case) will be treated as an argument to that command, not to docker run.

Upvotes: 5

Related Questions