Tag: nginx

Boot2Docker/Fig mounted volume not refreshing

I am using fig to mount my OS X directory through the boot2docker host vm. I am using the already provided Users directory. Try the following: /code/Tryme.txt – “Hello there” Volume: /Users//code:/code Start up an nginx server and serve the code from /code. Get the file via nginx: content is “Hello there” Change the content […]

Node.js in container always get the docker0 ip

I host an node.js server with express.js in a docker container. The address of my container is 172.17.0.62 And I use nginx to redirect the traffic to 172.17.0.62 I can access the my server. But when I use console.log(req.ip + ‘ ‘ + req.protocol + ‘ ‘ + req.originalUrl); to log the traffic. req.ip is […]

Nginx doesn't run with my dockers containers

I’m trying to build my infrastructure with Docker and I build this script but Nginx doesn’t work and I don’t know why, what I’m doing wrong: #!/usr/bin/env bash #Remove current containers docker stop $(docker ps -a -q) docker rm $(docker ps -a -q) #Run Mysql docker run –name mysql1 -d erkules/galera:basic -p 3306:3306 -p 4567:4567 […]

Use Docker, Gunicorn, Nginx in django development environment but can only see nginx welcome page?

I use Docker, Gunicorn, Nginx in django development environment but can only see nginx welcome page. my docker file: django: FROM python:3.5 ENV PYTHONUNBUFFERED 1 RUN groupadd -r django \ && useradd -r -g django django COPY ./requirements.txt /requirements.txt RUN pip install –no-cache-dir -r /requirements.txt \ && rm -rf /requirements.txt COPY ./compose/django/gunicorn.sh / RUN sed […]

502 bad gateway with nginx and node inside docker

I’m trying to run node and nginx each inside their own docker containers and proxy from nginx to node. I tried the configuration below without docker at first and it worked. However when using docker it’s not working and gives Status Code:502 Bad Gateway when trying to connect to http://localhost/. node server var http = […]

How to make pull public and push requiring login in docker registry v2?

I started the registry as composed containers using this instruction : https://www.digitalocean.com/community/tutorials/how-to-set-up-a-private-docker-registry-on-ubuntu-14-04 However I would like to differentiate access, so anyone without logging in have access to pull the images from repository, but cannot push. At the first approach I tried to achieve that by setting in nginx (because I used it for frontend like […]

nginx reverse proxy with docker – load balancing

I want to make a simple configuration regarding nginx as reverse proxy with using Docker technology. I am considering using this solution: https://hub.docker.com/r/jwilder/nginx-proxy/. I need to achieve the following behavior: ->when request comes to www.example.com, it will go to container A ->when request comes to www.example.com/part, it will go to container B (different container) I […]

Dockerized Nginx upstream error serving separate Docker container with Flask/uWSGI app

I am experiencing the following error with my multi-container Docker setup after running docker-compose build && docker-compose up and attempting to hit my index page: [error] 8#8: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.99.1, server: localhostz, request: “GET / HTTP/1.1”, upstream: “uwsgi://172.17.0.39:8000”, host: “192.168.99.100” Here is my docker-compose.yml: web: restart: […]

socket failed Too many open files error Docker

Within Docker container that I’m running with CentOS 6.6, I’m getting below error: 2014/12/25 15:09:07 [alert] 319#0: *2030 socket() failed (24: Too many open files) while connecting to upstream, client: 127.0.0.1, server: test.org.au, request: “GET / HTTP/1.0”, upstream: “http://127.0.0.1:80/”, host: “127.0.0.1” 2014/12/25 15:09:07 [crit] 319#0: *2030 open() “/usr/share/nginx/html/50x.html” failed (24: Too many open files), client: […]

docker: networking without linking

I have the following setup running on one host: 1 container with nginx: this one serves as reverse proxy for some webservices x container offering webservices, having exposed a port to the host x “oldschool”/non dockerized webservices when configuring nginx to proxy to “localhost:$EXPOSED_OR_NATIVE_PORT”, this does not work, because nginx can’t connect to this port. […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.