docker-library / nginx Goto Github PK
View Code? Open in Web Editor NEWThis project forked from libc/nginx
DEPRECATED; image taken over by NGINX upstream
Home Page: https://github.com/nginxinc/docker-nginx
This project forked from libc/nginx
DEPRECATED; image taken over by NGINX upstream
Home Page: https://github.com/nginxinc/docker-nginx
i use this entrypoint script as a workaround
lil bit overkill but works for much configurations.
#!/bin/bash
NGINXCONF=/etc/nginx/nginx.conf
#looks for inclusions in nginx conf
NGINXINCLUDES=for i in $(cat $NGINXCONF | grep include | grep -v mime.types | awk '{print $2}' | sed "s/;//g"); do echo "$i"; done
#replace strings that match /etc/hosts 2nd field (fqdn) by the 1st field (ip address)
for i in $(cat /etc/hosts | grep -v localhost | egrep "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}" | awk '{printf $2" "}')
do
SEDEX=$(echo "s/$i/$(cat /etc/hosts | egrep "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}" | grep $i | awk '{printf $1}')/g");
sed -i "$SEDEX" $NGINXCONF $NGINXINCLUDES
done
#replace strings that match /etc/hosts 3rd field (hostname) by the 1st field (ip address)
#fqdn have already been replaced so, no double replacement (fqdn contains hostname).
for i in $(cat /etc/hosts | grep -v localhost | egrep "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}" | awk '{printf $3" "}')
do
SEDEX=$(echo "s/$i/$(cat /etc/hosts | egrep "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}" | grep $i | awk '{printf $1}')/g");
sed -i "$SEDEX" $NGINXCONF $NGINXINCLUDES
done
I'm not sure if this issues lies with docker itself, docker-osx or nginx.
julien-duponchelle/docker-osx#68
Hi! A couple of suggestions:
All this would help to:
Is there a particular reason why the nginx is compiled from source instead of using the official packages ? Could it be --http-log-path and --error-log-path? I see the problem with additional modules (such as the recently added perl support) but this I believe should be up to the end user. The added benefits of using distribution packages are:
Consider perhaps publishing two builds: one based off of the nginx package and one off of nginx-extras. This at least allows a choice of core and/or optional nginx modules.
Also, perhaps nitpicking, jessie is still in testing. Perhaps use debian:stable instead of debian:jessie?
Looks like this repo is not used anymore. I spent quite some time until I realized this is not the repo used to build library/nginx
today. So maybe this repo should go away or have some deprecation notice?
I should be able to do docker run nginx --whatever --commands
without having to specify nginx
twice.
I'd even go so far as to say that the entrypoint should be ["nginx", "-g", "daemon off;"]
, but Nginx seems to choke if it finds a duplicate entry for daemon off;
in the configuration.
http://serverfault.com/a/247358/116303
This would allow me to capture my linked containers' IP addresses using something like perl_set $ghost 'sub { return $ENV{"GHOST_PORT_2368_TCP_ADDR"}; }';
, which I can then use in upstream
/server
placement.
I tried to restart a running container whose config had changed with:
docker kill -s HUP <container>
However, this event does not turn up in:
docker logs <container>
And, the config was not applied to new requests.
How can I send "reload" to a running nginx container?
Trying to run this with my container's configuration got finalize namespace chdir to /usr/local/nginx/html no such file or directory
I discovered a potential issue with the container. The server is started directly from the root user.
Is this an issue, or not? I know the process spawns a child running as www-data, so I may be way off. I just thought I would ask since docker really does not offer secure isolation at this time.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.