Git Product home page Git Product logo

Comments (5)

yosifkit avatar yosifkit commented on July 27, 2024

How are you changing the config file in the running container? What does your docker run look like?

I did some tests with a volume mounted file and was able to change the 404 page or the port by editing the nginx.conf and then running docker kill -s 1 <container>. There was no indication in the output that nginx had reloaded (I was running it with docker run -it --rm -v dir:dir nginx to watch the std out/err).

from nginx.

ToBeReplaced avatar ToBeReplaced commented on July 27, 2024

Mine's a little complicated:

docker run -d --name=<name> -v my_nginx.conf:/etc/nginx.conf -v my.crt:/etc/my.crt -v my.key:/etc/my.key -v html:/usr/local/nginx/html --link=some-container:other-container --expose=443 -p 80 -p 443 nginx:1.7.1

I disabled SELinux and the problem persisted.

Do you observe the changes when running with the container detached (without -it)?

from nginx.

yosifkit avatar yosifkit commented on July 27, 2024

I think I found the problem. I was mounting a directory with -v and you are mounting just a file. I tested doing -v with just the file and when I change the file on the host machine it does not reflect in the container (docker cp ng:/etc/nginx.conf ./nginx2.conf, then diff). This may be the limitation of -v with a file rather than a folder.

from nginx.

yosifkit avatar yosifkit commented on July 27, 2024

This sounds like a case of moby/moby#6011

from nginx.

ToBeReplaced avatar ToBeReplaced commented on July 27, 2024

Oh, that's interesting. Thanks for tracking that down! I'm sure I'm doing similar things in other places as well.

from nginx.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.