Answer the question
In order to leave comments, you need to log in
Why can't connect to postgres server in docker container?
1. Have a Windows 10 Host on it --> Virtual Box on it ---> (Vagrant + CentOS 8).
2. The network between Windows 10 and CentOS works through nat
3. Docker with containers is up on CentOS
version: "3.8"
services:
db:
image: postgres:12.3-alpine
container_name: postgres
ports:
- "5432:5432"
volumes:
- "./pg_data:/var/lib/postgresql/data/pg_data"
environment:
POSTGRES_PASSWORD: 123
POSTGRES_DB: movieblog
PGDATA: /var/lib/postgresql/data/pg_data
restart: always
adminer:
image: adminer
ports:
- "8080:8080"
restart: always
Answer the question
In order to leave comments, you need to log in
CentOS 8 switched to a new firewall subsystem - nftables, and Docker only supports iptables, then networking inside containers will not work. To fix this, enable masquerade traffic with firewalld:
firewall-cmd --zone=public --add-masquerade --permanent
firewall-cmd --reload
why are you specifying the postgres database in adminir-e when the database is called movieblog in docker-compose ?
Some players have this option (foobar, vl, mpc), or a hard version:
3.5mm stereo to 2 RCA male plugs + 3.5mm stereo to 2 RCA female - change white tulips to red - profit
Or a very harsh option - if you have a soldering iron, well, you understand)
About the soldering iron I’m already filming the version ... ahead of
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question