0

I have a pod with nginx image, but it also has the command "nginx".

apiVersion: v1 kind: Pod metadata: name: nx spec: containers:

  • name: nginx image: nginx command: ["nginx"] #what does this do? it's not bin/sh -c args: ["-g", "daemon off;", "-q"] ports:
    • containerPort: 80

-g daemon off is means 'nginx runs in quiet mode.

But what is 'nginx' cmd actually? Does it mean it says enter the actual web-server nginx?

ERJAN
  • 23,696
  • 23
  • 72
  • 146

2 Answers2

1
confused genius
  • 2,876
  • 2
  • 16
  • 29
0

In case you want to run nginx in a docker container, when you set nginx -g 'daemon off; you run as a background process as mentioned before, in addition that you can interact with the container terminal.