Comments (5)
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.
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.
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.
This sounds like a case of moby/moby#6011
from nginx.
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)
- Would you consider adding perl support? HOT 3
- Configuration folder & sites configuration as mountable volume HOT 7
- ["nginx"] should be the ENTRYPOINT, not CMD HOT 4
- nginx doesn't use file for name resolution VS docker linking use file for name resolution HOT 1
- Remove this repo? HOT 4
- nginx runs directly as root HOT 11
- Build with packages? HOT 4
- nginx serves corrupted files when files edited in host mounted volume HOT 4
- "WORKDIR /usr/local/nginx/html" assumes I have a /usr/local/nginx/html HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nginx.