Running a bash script before startup in an NGINX docker container

后端 未结 5 828
野性不改
野性不改 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:29

    NGINX 1.19 has a folder /docker-entrypoint.d on the root where place startup scripts executed by thedocker-entrypoint.sh script. You can also read the execution on the log.

    /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration

    /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/

    /docker-entrypoint.sh: Launching

    [..........]

    /docker-entrypoint.sh: Configuration complete; ready for start up

提交回复
热议问题