Questions tagged as ['docker-compose']
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 \
...

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?

This is my docker-compose.yml
:
version: '3.7'
services:
minio:
image: minio/minio
command: server -C /etc/minio --address ":9000" --console-address ":9001" /data
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
volumes:
- minio:/data
- /etc/minio:/root/.minio/
- /etc/minio:/e ...

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:
docker-compose.yaml
version: '3'
services ...

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 ...
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
...
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 ...
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 ...
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):
services:
web:
image: nginx:alpine
networks:
docker-network:
aliase ...
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' ...
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?

I've just installed booksonic-air through docker compose
and when running curl http://127.0.0.1:4040 i get Connection reset by peer
error.
Docker container looks like listening to 0.0.0.0 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"
services:
boo ...

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" ...

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 ...
I want to host multiple websites in one server with nginx reverse proxy by following this tutorial https://www.datanovia.com/en/lessons/how-host-multiple-https-websites-on-one-server/
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 websiteone.tk 1st time, loaded website ONE's con ...
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.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
nginx | /docker-entrypoint.sh: Lo ...
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 ...

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 ...
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@1.1.1.1")
- 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 ...
Im trying, unsuccessfully, to run the official haproxy container (https://hub.docker.com/_/haproxy) with an environment file per (something like this https://www.loadbalancer.org/blog/how-to-install-haproxy-rhel/) to allow me to substitute vars in my haproxy.cfg, example:
## env.txt
node1=www1.domain.com
node2=www2.domain.com
node_port=80
## haproxy.cfg
global
...
defaults
...
frontend somefro ...

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? ...
Hi I have following docker-compose.yaml file.
version: "3.9"
volumes:
local_postgres_data2: {}
local_postgres_data_backups2: {}
services:
postgres:
image: postgres
container_name: angel-postgres
restart: always
volumes:
- local_postgres_data2:/var/lib/postgresql/data:Z
- local_postgres_data_backups2:/backups:z
environment:
POSTGRES_DB: angel-agility
...
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
docker-compose.yml:
version: '3.9'
services:
traefik:
container_name: traefik
image: traefik:v2.6.0
po ...
I am new experimenting with docker and nginx and it seems that i cannot make Nginx.
context:
- 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 ...

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

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 127.0.0.1 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 ...

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
option_settings:
aws:elb:loadbalancer:
ManagedSecurityGroup: "sg-xxxxxx"
SecurityGroups: "sg-xxxxx"
aws:elbv2:loadbalancer:
...

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?
ubuntuserver@ubuntu:~/Nginx-Reverse-Proxy/proxy$
ubuntuserver@ubuntu:~/Nginx-Reverse-Proxy/proxy$ cat docker-compose.yml
version: "2"
services:
proxy:
build:
context: ./
networks:
- example1
- example2
ports:
- 80:80
- 443:443
networks:
example1:
external:
name: example1_default
example2:
external:
name: example2_d ...
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 ...