skip to Main Content

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?

2

Answers


  1. Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search