Questions tagged as ['docker-compose']

Compose is a tool for defining and running multi-container Docker applications.
Score: 0
Munchkin avatar
Docker: error could not translate host name to address: Name or service not known in psql
et flag

We have the following Dockerfile:

FROM debian:stable-slim

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get full-upgrade -y && apt-get install -y --no-install-recommends \
    systemd \
    procps \
    apt-utils \
    build-essential \
    postgresql-server-dev-all \
    postgresql-plpython3-13 \
    pgxnclient \
    libc6-dev \
    wget \
    python3 \
    python3-pip \
Score: 0
Can you get the grep command to EXIT 1 if query successful?
it flag

I'm trying to formulate a docker healthcheck that restarts the container if the word FATAL in found in a certain log file. Something similar to this except with grep.

test: ["CMD-SHELL", "curl -f http://localhost || exit 1"]

Something like:

test: ["CMD-SHELL", "grep -i 'fatal' /var/log/log.txt || exit 1"]

Would that work?

Score: 2
configure minio in docker to use https
sa flag

This is my docker-compose.yml:

version: '3.7'

    image: minio/minio
    command: server -C /etc/minio --address ":9000" --console-address ":9001" /data
      - "9000:9000"
      - "9001:9001"
      MINIO_ROOT_USER: minioadmin
      MINIO_ROOT_PASSWORD: minioadmin
      - minio:/data
      - /etc/minio:/root/.minio/
      - /etc/minio:/e ...
Score: 1
connect() failed (111: Connection refused) while connecting to upstream with static website
cn flag

My goal is to have 2 docker containers:

  • nginx container (based on nginx:latest) to work as reverse proxy
  • container with static website (based on nginx:alpine)

Later I will add 1+ .net core backend services (not important for now). Currently when I try to access my webserver using public ip address, I get 502 Bad gateway. Here is my current configuration:


version: '3'
services ...
Score: 0
mariadb-client cannot connect to db throwing "RSA Encryption not supported"
no flag

I have a docker-compose with a 'db' and 'web' containers. The db is a mysql:8.0 image, and the web is a python:3.9-slim.

If I try to connect to the MySQL server inside the db container, it works. But not if I try it inside the web container, from where I get the following error:

root@c08888899ca9:/local/app# mysql -h db -u root -p123qwe
ERROR 2061 (HY000): RSA Encryption not supported - caching_sha ...
Score: 0
Boris avatar
ebtables not working in docker
us flag

Hi I am trying to run ebtables within docker however none of the ebtables rules are being hit.

For example - pay attention that counters are not increased though ARP is sent and succeeds

[root@injector /]# ebtables -A OUTPUT -p ARP -j ACCEPT
[root@injector /]# ebtables -Lc  --Lc --Lx
Bridge table: filter

Bridge chain: INPUT, entries: 0, policy: ACCEPT

Bridge chain: FORWARD, entries: 0, policy: ACCEPT

Score: 0
Boris avatar
docker containaer promiscuous mode partially working
us flag

I have strange virtual (docker bridges) networking condition

I have two dockers connected to the same bridge via docker-compose. One docker is "probe" and one is "injector". Injector uses tcpreplay to replay capture and "probe" should receive it via tcpdump. Needless to say the capture replayed does not have any relation to IPs or macs of the NICS attached to the bridge. pinging is working fine b ...

Score: 0
AGI_rev avatar
Secondary IP not pingable from internet - Ubuntu 20.04 using netplan on Hetzner server
in flag

Let me start be saying I'm not an network expert. That being said, I'd need some help here as I'm breaking my head on this issue for two days now. I have several questions but will focus only on one specific one.

I ordered a hetzner root server and installed Ubuntu 20.04. Right after I ordered a secondary IP as I need it for my docker setup where I want two containers to be accessible directly on ...

Score: 0
Sergio Dulcey avatar
Docker-compose: how to use Nginx Reverse Proxy with routing
it flag

I am using docker-compose with nginx reverse proxy to run it on server with different paths:

  • server_ip/backend
  • server_ip /frontend

should work on port 80.

I'm testing it with a docker-compose using nginx as the web container name and phpmyadmin as the container name myadmin (mysql):

        image: nginx:alpine
               aliase ...
Score: 0
hopsey avatar
How to access hosts local network from a docker container?
ve flag

I have two machines running in one local physical network in the office. One of them is exposed to world as a http web server (nginx on docker), the other one is not exposed to the world, it exposes a private service with API that should only be accesible to machines connected localy to the same physical network.

I want the first machine (exposed to the world) proxy-pass to the second one, but I' ...

Score: 0
Brady Dean avatar
`docker-compose.override.yml` `restart: no`: containers still start up after reboot
kr flag

In my base configuration I have a few services with restart: always and in my override configuration I have those services with restart: "no", but when I reboot the host the containers are started up again. I'm expecting the containers to still be stopped, am I missing something here?

Score: 0
booksonic-air docker container Connection reset by peer
cn flag

I've just installed booksonic-air through docker compose and when running curl i get Connection reset by peer error.

Docker container looks like listening to address so I should be able to access from the host OS.

Does anyone know how could I solve it?

This is the docker compose yml config file:

# docker/docker-compose/booksonic-air.yml
version: "2.1"
  boo ...
Score: 0
Docker container eating space over time in my EC2
jp flag

I've installed only Hasura and a Postgres database (yes yes, I'll change it) in 1 docker container each. The containers themselves don't use much space, but my overall storage space is rapidly being used up each passing day! I have no idea why, I'm pretty new to this.

Using Ubuntu 16.0.4 in AWS EC2.

Results of docker ps as

015ff0c04b91        hasura/graphql-engine:v2.2.1   "graphql-engine serve"   ...
Score: 0
How to fix a Nextcloud docker container after skipping a major version?
mx flag

I am running my private Nextcloud instance using docker (docker-compose). I tried to upgrade to a newer Nextcloud version but did not realize I was not supposed to skip a major version (from 21 to 23). Now I cant start it at all:

  • When I try to start the container with version 23 and trigger the upgrade, it fails because it cannot upgrade from 21:
    leifb@***:~/nextcloud$ sudo docker-compose exec --use ...
Score: 0
ehku avatar
Nginx reverse proxy is loading different sites when refreshing
fi flag

I want to host multiple websites in one server with nginx reverse proxy by following this tutorial

The Nginx proxy and each website are launched separately with Docker. But every time I reload one of the website, it load the content of other website. For example:

  • Load 1st time, loaded website ONE's con ...

Score: 0
ignacio aranguren avatar
Nginx connection refused
ng flag

I'm using docker containers to host a web app. I have three main containers: MySQL, flask and Nginx. The first two work as expected and the latter seems to be working fine as no error is displayed in the docker-compose startup.

Nginx container initialization output:

nginx  | / /docker-entrypoint.d/ is not empty, will attempt to perform configuration
nginx  | / Lo ...
Score: 0
r j avatar
Sail up for a cloned laravel project does not work
cn flag
r j

I have Windows 10, WSL2, and Docker.

I've cloned a repository from GitHub, and when I try to sail up, I get this message: /usr/bin/env: ‘sh\r’: No such file or directory.

The following is from the laravel website which I believe is the solution to my problem:

docker run --rm \
    -u "$(id -u):$(id -g)" \
    -v $(pwd):/var/www/html \
    -w /var/www/html \
    laravelsail/php81-composer:latest ...
Score: 0
Docker container does not register host name in docker-internal DNS
jp flag

I use Docker to implement a Nextcloud service. For this, I use the official nextcloud-apache image, an Nginx reverse proxy, certbot, and MariaDB. Nothing special, really.

My docker instance runs in swarm mode. All containers run together with the manager on the same host with only one replica for each service, standard overlay network(s). The swarm is started by using a standard compose file.

My set ...

Score: 0
jimmytann avatar
Syncing docker-compose remote context state across multiple developers
hu flag

Got a question about docker contexts, Fellas.

  • Assuming we make a docker-compose context for a remote machine (i.e., `docker context create aaa --docker "host=ssh://root@")
  • And build it and run it on the remote machine (i.e., docker-compose --context aaa up -d)
  • Now the machine is running. Let's say I left my computer and my colleague using their computer wants to check some logs for the machin ...
Score: 0
richv avatar
Using environment file in haproxy container
in flag

Im trying, unsuccessfully, to run the official haproxy container ( with an environment file per (something like this to allow me to substitute vars in my haproxy.cfg, example:

## env.txt
## haproxy.cfg


frontend somefro ...
Score: 0
Docker container dosnt see new group that I added
cn flag

I have my user theuser who belongs to the groups docker and systemd-coredump. When I login via ssh I can see via the groups command that I do indeed have the systemd-coredump group. The strange thing is my docker container (running as theuser) can not read a file that is set to RW for the systemd-coredump group.

Should I need to restart the docker service to fix this or is a complete system reboot needed? ...

Score: 0
Mudassar Hashmi avatar
Redis inside Docker Compose Permission Denied for RDB file Crontab
co flag

Hi I have following docker-compose.yaml file.

version: "3.9"

  local_postgres_data2: {}
  local_postgres_data_backups2: {}

    image: postgres
    container_name: angel-postgres
    restart: always
      - local_postgres_data2:/var/lib/postgresql/data:Z
      - local_postgres_data_backups2:/backups:z
      POSTGRES_DB: angel-agility
Score: 0
Frugan avatar
Real Client-Ip with Cloudflare, Docker, Traefik and nginx set up as a mail proxy (Client-Ip in PHP script, not in upstream mail server)
id flag

I set nginx as a mail proxy, but i have trouble detecting the real Client-Ip in the php authentication script called by nginx via auth_http.
I am not interested in getting real-IP on the upstream mail server.

This is my stack:

  • Cloudflare manages dns
  • The rest is all handled with Docker


version: '3.9'

    container_name: traefik
    image: traefik:v2.6.0
    po ...
Score: 0
alsonic avatar
nginx domain name is not showing docker
de flag

I am new experimenting with docker and nginx and it seems that i cannot make Nginx.


  • there is 3 docker container run on docker compose (Nginx, frontend, and a Api backend)
  • the website works fine with the IP address
  • using the domain name redirects to the serveur IP

Problem :

I cannot make ngnix to display the name domain in the url bar, it displays the server IP

Not sure if it a docker issu ...

Score: 0
Is there a de-facto 'standard' for the gateway address on a LAN
cn flag

Is there a de-facto 'standard' for the gateway address on class C subnets?

Asking because I've been fighting a docker-compose issue with macvlans where it assumes the gateway is always at 192.x.x.1, while the actual gateway is 192.x.x.251

Score: 0
How to setup a VPN server as the only way to access Docker containers on a Linux VPS?
lt flag

I'm running a container with docker-compose on a Linux VPS (Ubuntu 20.04). I want the container to be accessible only via a VPN (ie: the container ports are not exposed on the host to the Internet and the container only accepts traffic from and the docker network) so I am thinking of setting up a VPN server on the VPS. I would like to understand if it's feasible and get suggestions on how to i ...

Score: 0
How to add condition in elbsg.config in ebextensions for elasticbeanstak
cn flag

Currently, we use docker-compose and .ebextensions to update elastic load balancer security group. However now I have requirement to apply different security groups for different environment. How do I add the condition to elbsg.config ? Below is my current elbsg.config

  ManagedSecurityGroup: "sg-xxxxxx"
  SecurityGroups: "sg-xxxxx"
Score: 0
VM Instance write permisson (Container Optimized OS)
pe flag

Actually I set up a VM instance and installed a container base OS but now when I run the container with docker-compose up (just an alias) I receive an error from traefik, do you know what the problem is? I always receive an error that storage is not writable. But I can't change it?

Score: 0
Prashanth Kannan avatar
Indent issue at docker compose
eg flag

enter image description here

ubuntuserver@ubuntu:~/Nginx-Reverse-Proxy/proxy$ cat docker-compose.yml
version: "2"

    context: ./
    - example1
    - example2
    - 80:80
    - 443:443

      name: example1_default
      name: example2_d ...
Score: 0
adamsfamily avatar
docker-compose `restart: always` randomly not working
in flag

I administer a few Debian servers with Docker CE installed and docker-compose orchestrating several services (roughly 20 containers per machine)..

Every single service is configured with restart: always in docker-compose. However, there are random services (usually 1-2 per machine) that shut down correct but do not restart during a host reboot. This behaviour is completely random. Sometimes all services ...