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.

581 questions
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
6
votes
1 answer

How to secure a docker host to not allow rooting

I am trying to make docker on a server more secure. The main problem is that most people say "if a person has access to docker, they can be root too" for an administrator point of few this is not something you would want. To elaborate, they can use…
5
votes
1 answer

nginx won't serve json file unless specifying .json in url

I have the following nginx.conf file: server { listen 8080; server_name dummy_server; root /usr/share/nginx/html; location / { if ($request_method = 'OPTIONS') { add_header 'Access-Control-Allow-Origin' '*'; …
ran
  • 53
  • 1
  • 4
5
votes
1 answer

Podman: Method to convert docker-compose files to systemd unit files

I'm migrating away from docker towards podman (not going straight for kubernetes, as that would definitely be overkill at this point). Now, many an elegant configuration can be had as docker-compose setup – but docker-compose relies on the docker…
Marcus Müller
  • 500
  • 4
  • 13
5
votes
2 answers

How to forward application logs from Docker containers to ELK

I'm trying to centralise logging in an environment that using multiple application technologies (Java, Rails and various DBs). We want to developers to bring up stacks with Docker Compose, but we want to them to refer to a central log source (ELK)…
Garreth McDaid
  • 3,449
  • 1
  • 27
  • 42
5
votes
2 answers

set time period to restart a container with docker-compose

how would you do to restart the container service every 60 seconds I tried sleep but it doesn't work for me: spark: image: jaegertracing/spark-dependencies environment: - STORAGE=elasticsearch - ES_NODES=http://localhost:9200 …
user482363
4
votes
2 answers

nginx can't find /etc/letsencrypt/options-ssl-ngin.conf file

I'm trying to serve a python-django webapp using a linux box (running ubuntu 18.04) with nginx, gunincorn, letsencrypt and docker. After following a number of online tutorials I have been successful in serving the app via http through port 80 by…
Matt Ellis
  • 41
  • 1
  • 1
  • 2
4
votes
1 answer

Docker Compose and multiple subnets

I'm struggling with Docker Compose (version 2 or 3). I'm trying to add multiple subnets, so various services can reach each other, but get assigned IPv4 addresses from different subnets. This is my current configuration: networks: custom: …
Alfred Balle
  • 409
  • 3
  • 9
  • 22
4
votes
1 answer

How do I access nginx server logs from within Docker?

I have Nginx routing requests from the browser to either the Express API or my react server, however, in the console I continue to get xhr requests that are just pending and then timeout with 502 bad gateway error which are generally caused by Nginx…
Daniel
  • 219
  • 1
  • 4
  • 14
4
votes
1 answer

Why isn't firewalld filtering the services running in my Docker containers?

My services were filtered correctly after migrating from iptables to firewalld and updating the rules with firewall-cmd. Then I moved all services to containers using Docker, and ran everything with docker-compose. My default zone is 'public'. I…
4
votes
1 answer

How to move docker-compose containers stack to another host

I have a project running on a host using docker compose. Can anyone advise me on how can I move the docker-compose containers to another host?
4
votes
2 answers

Setup wordpress container in subdirectory with nginx and mariadb

Ok guys here is the problem: i have my webserver serving a website, a cms and mobile app api using a subdirectory approach like this localhost -> site localhost/cms localhost/api everything is built using docker compose services: server: …
javal88
  • 143
  • 1
  • 7
4
votes
0 answers

Connecting a local Elixir/Erlang to a running application inside a Docker container

I've got an Elixir application running inside a Docker container (in my laptop). The Elixir application was executed with the following command: iex \ --name test@1.2.3.4 \ --cookie secret \ --erl '-kernel inet_dist_listen_min 9000' \ --erl…
4
votes
3 answers

Docker Compose returns error "networks have overlapping IPv4"

starting by saying I am totally new to Docker and I am not yet familiarized with the Docker ecosystem. What I try to perform is to create a docker-composer.yml to be used in my local dev environment across my projects. I already use the…
KodeFor.Me
  • 209
  • 3
  • 5
  • 14
1 2
3
38 39