Running a bash script before startup in an NGINX docker container

后端 未结 5 830
野性不改
野性不改 2021-02-15 10:56

I\'m trying to run a javascript app on localhost:8000 using docker. Part of what I would like to do is swap out some config files based on the docker run command, I\'d like to p

5条回答
  •  执笔经年
    2021-02-15 11:36

    nginx container already defines ENTRYPOINT. If you define also CMD it will combine them both like 'ENTRYPOINT CMD' in such way that CMD becomes argument of ENTRYPOINT. That is why you need to redefine ENTRYPOINT to get it working.

    Usually ENTRYPOINT is defined in such way, that if you also pass CMD, it will be executed by ENTRYPOINT script. However this might not be case with every container.

提交回复
热议问题