Tag: nginx

gitlab docker ssh issue

I looked the different posts concerning gitlab, docker, and ssh issues without any help. So, I ask my question here. I have the following setting: linux box with ubuntu server 14.04 and IP DNS: git.mydomain.com = A gitlab docker that I start, according to the official doc, this way: sudo docker run –detach […]

Docker – few containers

Who could explain how create and connect one to other docker containers. I need info how connect one container with Nginx to second container with PostgreSQL. How make this relation? First container with Nginx should get info from second container with Postgre. I know how create container, how start service but i don’t know how […]

nginx in Docker on OS X doen't reload html

I tried to use nginx on boot2docker with OS X. I hope to start a web server. I tried with command below; docker run -d –name web -p 80:80 -v /Users/douglas/tmp/local_console:/usr/share/nginx/html:ro nginx Then I changed the content of index.html, and curl $(boot2docker ip), but the index.html is not changed. I tried to stop and restart […]

Rewriting URL path with Nginx, no redirect

Say we have url http://example.com/blog/posts and we want to use Nginx to serve as a forward proxy, directing that request to a backend that will only see that url as http://example.com/my-blog/foo/posts. How is this possible with nginx, no redirects and totally transparent to the backend? We have the following so far: rewrite ^/blog/(.*)$ /my-blog/foo$ last; […]

Rails and Nginx on different Docker containers (how share data between containers)

I want to know if it’s possible (or even a good practice) to run a Rails app and Nginx on different Docker containers. My intention is to use one instance of Nginx to serve more than one application running in containers in the future. My question is because I will have to configure Nginx to […]

Rails Puma inside of Docker Instance stops responding from inactivity

I have a Docker file which correctly builds and runs a Rails Application. Everything works. As long as I keep sending traffic to the instance, it works. However, if I leave it idle for more than a couple of minutes, it stops responding. On the server, wget localhost: just gets stuck. wget localhost:8081 –2014-01-28 18:34:23– […]

Keep Docker running when shell script exits

I have the following docker file. FROM ubuntu RUN apt-get update EXPOSE 9000:80 # Install nginx RUN apt-get install -y nginx # Install Curl RUN apt-get -qq update RUN apt-get -qq -y install curl ENTRYPOINT service nginx start When I try to run the following commands in a shell script, the docker image is created […]

How can I see a dynamically assigned port from within a docker container?

I have a server application that takes a few minutes to fully startup and be ready to process requests. I want to have the container register itself with an NGINX load-balancer when it knows that it has started, but I don’t know how to determine the port docker assigned to the container (I’m starting lots […]

Running a Docker container on AWS Elastic Beanstalk – 502 Bad Gateway nginx/1.6.2

I have a docker deployed on AWS Elastic Beanstalk – http://paymentsystem-env.elasticbeanstalk.com/ . The application is Java web application . It runs about one day and then I get a 502 Bad Gateway from nginx/1.6.2. \var\log\nginx\access.log & \var\log\nginx\error.log are empty. Dockerrun.aws.json : { “AWSEBDockerrunVersion”: “1”, “Image”: { “Name”: “kazenguyen/paymentsystem:v1”, “Update”: “true” }, “Ports”: [ { “ContainerPort”: […]

Route web Node.js + Vagrant + Nginx

I have 3 instances of CoreOS in Vagrant. In one of them I have a Docker container with Node.js and other with MongoDB. The Node.js container has nginx configured and working if I do a wget in the container and in the instance of coreOS. My question is if I have to configure something more […]

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