Questions tagged [docker-compose]

Compose is a tool for defining and running multi-container Docker applications.

Docker Compose is a tool for defining and running multi-container Docker applications.

529 questions
8
votes
3 answers

How do I give a docker container its own routable IP on the original network?

Main question Imagine this scenario. A network of 192.168.0.0/24. A computer with hostname 'Docker-Host' is running a docker engine at 192.168.0.2 'Docker-Host' has sshd server running On 'Docker-Host' , I'm running a application in a container…
TrevorKS
  • 233
  • 1
  • 2
  • 6
8
votes
2 answers

nginx and php-fpm: "Primary script unknown" while reading response header from upstream

I want pass any api/* route to php-fpm. Specifically to index.php as I use Symfony. This is the only route that should use php. Anything else will be loaded from /usr/share/nginx/html/public (just HTML files and CSS). I've attempted this, but I'm…
BugHunterUK
  • 331
  • 1
  • 2
  • 10
8
votes
2 answers

How to prevent docker-compose appending hashes to created container names?

I have a server with several lxc containers. In some of the containers there is a docker installed. Usually a docker compose action in these LXC containers results in container names with the format appname_service_1, e.g. wordpress_app_1 and…
simonszu
  • 343
  • 5
  • 14
8
votes
5 answers

Is there any way to run Postfix in foreground?

Is there any way to run Postfix in foreground? I want to run Postfix as PID 1 in docker. I don't want to use any bash shell, supervisorD, or any wrapper to start it. I just want to know if there is any way to start it in foreground so I can check…
Farhan
  • 4,210
  • 9
  • 47
  • 76
8
votes
2 answers

Where is docker volume stored in the host computer for docker-compose?

Consider the following docker-compose file version: "2" services: postgres: image: postgres:9.6 volumes: - ./vol_folder:/var/lib/postgresql ports: - "5432:5432" Here is my command history on my mac docker-compose up psql…
kevP
  • 81
  • 1
  • 1
  • 3
8
votes
2 answers

Configure php-fpm to access environment variables in docker

I'm running php7-fpm in a docker container. However my php scripts aren't able to access environments variables set in my docker-compose file. getenv('MY_ENV_VAR') returns FALSE. I've changed /etc/php/7.0/fpm/pool.d/www.conf to include clear_env =…
Aidan Ewen
  • 271
  • 1
  • 4
  • 11
8
votes
1 answer

How to forward Docker container logs to ELK?

I would like to know what is the easiest way to forward my docker container logs to an ELK server, so far the solutions I have tried after having searched the internet didn't work at all. Basically I have a docker image that I run using…
ndarkness
  • 193
  • 1
  • 7
8
votes
3 answers

CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team

I'm trying to run docker-compose (which was installed via pip), yet running into following error: # pip install --quiet docker-compose # docker-compose ps /usr/local/lib/python2.7/dist-packages/paramiko/transport.py:33:…
alexus
  • 12,342
  • 27
  • 115
  • 173
7
votes
1 answer

WEBRTC MCU/SFU inside kubernetes - Port Ranges?

I am using janus-gateway as a webrtc media server for group videocalling. Previously I had deployed it in a single node using docker-compose but now I want to be able to scale it horizontally. For this, I am trying to use kubernetes but I am facing…
Abdul Basit
  • 171
  • 1
  • 2
7
votes
2 answers

Docker + Nginx + PHP-FPM error: [emerg] 1#1: host not found in upstream

I have a docker setup for LEMP stack that I cloned from this repo. Everything works nicely on my development machine running window 10, but when I push the image to docker hub and pull it on my VPS no matter what I do I always get this error:…
samayo
  • 277
  • 3
  • 5
  • 17
6
votes
1 answer

How to do docker-compose down without the config file that made the up?

When you do docker-compose up, it's based on a docker-compose.yml file. This usually brings up a network, builds and runs multiple services. If you do the up with the -d flag, the docker-compose client detaches and let the servers alone. If you do a…
6
votes
1 answer

connection between two docker containers of two stacks

I am building on two projects which share some common data. The services of the two projects are built from two docker-compose YML files. I want to access the MySQL server specified in one stack from the Python script running on the other stack. I…
ロジャー
  • 203
  • 3
  • 8
6
votes
2 answers

EC2 Instance Freezes

I am experiencing sudden freezes in one particular instance. Here some details of the instance: Type: t2.micro Region/av. zone: us-west-2b OS: amzn-ami-hvm-2018.03.0.20180811-x86_64-gp2 (ami-a0cfeed8) My this Ec2 instance freezes automatically. I…
6
votes
2 answers

Why is there no php.ini file when I install PHP in a docker container?

I'm using docker-compose to setup a minimal nginx + php-fpm application but for some reason there is no php.ini file on the docker container (I know because phpinfo() says Loaded Configuration File: (none)). Here's my docker-compose.yml file: web: …
skb
  • 93
  • 1
  • 2
  • 7
6
votes
1 answer

docker-compose exec composer as user

I have a docker-compose setup working perfect on my local machine for my symfony projects with nginx, php7-fpm and mysql. I often need to install new packages via composer, so I just deliver the command to my php-fpm container like…
sh4
  • 241
  • 1
  • 3
  • 7
1
2
3
35 36