Docker images open badly

In the process of am making a docker, I have to change its command from /bin/sh to nginx -g "daemon off;" (exactly that).

I wrote:

docker commit --change="EXPOSE 80" --change='CMD ["nginx", "-g", "\"daemon off;\""]' ${arr[0]} mine/nginx_final

Where ${arr[0]} expands to the correct docker container.

However when I try to run this docker it fails with the error:

nginx: [emerg] unexpected end of parameter, expecting ";" in command line

Docker inspect also doesn’t show anything bad:

        "Cmd": [
            "nginx",
            "-g",
            "\"daemon off;\""
        ],

expected, and i expect the "\"daemon off;\"" to expand to “daemon off;”

Yet I’m pretty sure there is a ; sign after deamon off. Where did this sign go? And how can I debug this? (And fix it)

i think the ‘;’ needs to be after the close quote