Tag: nginx

Issue with docker compose: container command not found

I’m having an issue when trying to start multiple containers with docker-compose: Dockerfile: FROM nginx:1.9 ADD ./nginx-sites/default /etc/nginx/sites-available/default docker-compose.yml: version: “2” services: web: build: . ports: – “80:80” volumes: – ./src:/var/www links: – fpm fpm: image: php:7-fpm volumes: – ./src:/var/www When I use docker-compose up to start the application, I get the following error: ERROR: […]

Docker compose – share volume Nginx

I just want to test Docker and it seems something is not working as it should. When I have my docker-compose.yml like this: web: image: nginx:latest ports: – “80:80” when in browser I run my docker.app domain (sample domain pointed to docker IP) I’m getting default nginx webpage. But when I try to do something […]

Unable to use -lt when running Nginx Docker or cat logs

I’ve recently pulled a nginx image: docker pull nginx I can run it successfully and go to http://server_name and see the “Welcome to Nginx” page: docker run -d -p 80:80 nginx But then when I try to check logs: docker exec 6c79549e3eb4f6e5fc06f049b67814ac4560ce2cdd7cc6ae84b44b5ae09a9a05 cat /var/log/nginx/access.log It just hangs and outputs nothing. Same with error log. Now […]

My docker container isn't starting on localhost ( on Docker for Windows (Native using Hyper-V)

I’m following Digital Ocean’s tutorial on how to start a nginx docker container (Currently on Step 4). Currently this is their output: $ docker run –name docker-nginx -p 80:80 -d nginx d3ccb73a91985651ec61231bca9f9c716f0dec807e354a29eeef2144f883a01c $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b91f3ce26553 nginx “nginx -g ‘daemon off” About a minute ago Up About […]

Docker best practices: single process for a container

The Docker best practices guide states that: “…you should only run a single process in a single container…” Should Nginx and PHP-FPM run in separate containers? Or does that mean that micro service architectures only run one service or “app” in a container? Having these services in a single container seems easier to deploy and […]

docker nginx container not receiving request from outside, connection refused

I have a running nginx container: # docker run –name mynginx1 -P -d nginx; And got its PORT info by docker ps:>80/tcp,>443/tcp Then I could get response from within the container(id: c30991a04b2f): docker exec -i -t c3099 bash curl http://localhost => which return the default index.html page content, it works However, when I […]

How do I access a server on localhost with nginx docker container?

I’m trying to use a dockerized version of nginx as a proxy server for my node (ExpressJS) application. Without any configuration to nginx and publishing port 80 for the container, I am able to see the default nginx landing page. So I know that much is working. Now I can mount my sites-enabled directory that […]

Docker php-fpm/nginx set-up: php-fpm throwing blank 500, no error logs

Git repo of project: https://github.com/tombusby/docker-laravel-experiments (HEAD at time of writing is 823fd22). Here is my docker-compose.yml: nginx: image: nginx:stable volumes: – ./nginx.conf:/etc/nginx/conf.d/default.conf:ro volumes_from: – php links: – php:php ports: – 80:80 php: image: php:5.6-fpm volumes: – ./src:/var/www/html expose: – 9000 Into src/ I’ve created a fresh laravel project. This all functions correctly if I swap […]

Logging from multiprocess docker containers

I’m using the nginx method of symlinking linking to /dev/stdout for any log files that I want to appear in ‘docker logs’, however this is not working. I have tested this with a simple cronjob in /etc/crontab, if a symlink is present (pointing to /dev/stdout) it doesn’t write anything (as far as I can tell), […]

Dokku: Listen to multiple ports from an app

I’m deploying a node app (with express js) with dokku. My app consists of 2 express js apps that listen to two different ports. One being the main app and the other is web inteface for kue – A simple job queue for node js. When I deploy the app I need to run both […]

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