docker-compose

Containers communication with python requests

心不动则不痛 提交于 2021-02-07 07:11:15
问题 Here is my architecture : I have two containers (A and B) running on the same host with their own network. docker-compose : version : '3' services: A: build: ./docker_A ports: - "8090:8090" networks: - my_network B: build: ./docker_B ports: - "8070:8070" networks: - my_network networks: my_network: driver : bridge Container b is running a bottle server : @get('/') def hello(): return {"say":"Hello world"} run(host='0.0.0.0', port=8070, debug=True) docker inspect package_name_my_network

postgres with docker compose gives FATAL: role “root” does not exist error

落花浮王杯 提交于 2021-02-07 06:25:26
问题 I'm trying to create a simple demo with postgres on a local windows machine with docker desktop. This is my yaml docker compose file named img.yaml : version: '3.6' services: postgres-demo: image: postgres:11.5-alpine container_name: postgres-demo environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=Welcome - POSTGRES_DB=conference_app healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 10s timeout: 5s retries: 5 ports: - 5432:5432 volumes: - .:/var/lib/my_data restart:

Docker: How to prevent outgoing traffic from a docker's network using docker-compose and no iptables?

会有一股神秘感。 提交于 2021-02-07 04:25:15
问题 I'm using Alpine Linux as a base for my containers, so no iptables for me, and I would rather not have to add it only for that. I found this answer: https://stackoverflow.com/a/42336592/1326863 that tells that it is possible to disable internet in a docker's network, but is it possible to do it in docker-compose configuration? 回答1: This db container cannot reach the Internet in my tests: version: '3' services: db: image: postgres:alpine networks: default: internal: true 来源: https:/

Wordpress wp-config.php doesn't update in Dockers?

时光总嘲笑我的痴心妄想 提交于 2021-02-07 02:39:16
问题 I am using Wordpress and docker container. The problem is that I updated the wp-config.php file but everything looks the same. I have something like this: CONTAINER ID IMAGE NAMES b2711d4b72a1 phpmyadmin/phpmyadmin website_phpmyadmin_1 8a89ee46d673 wordpress:4.7.5 website_wordpress_1 2a167667f705 mysql:5.7 website_db_1 My docker-compose.yaml looks like this: version: '2' services: wordpress: depends_on: - db image: wordpress:4.7.5 restart: always volumes: - ./wp-content:/var/www/html/wp

How can we install google-chrome-stable on alpine image in dockerfile using dpkg?

為{幸葍}努か 提交于 2021-02-06 19:57:02
问题 I am trying to install google-chrome-stable on alpine image using dpkg. However, the dpkg is installed but it does not install google-chrome-stable and return this error instead? Is there a way to install google-chrome-stable in alpine image either using dpkg or other way? dpkg: regarding google-chrome-stable_current_amd64.deb containing google-chrome-stable:amd64, pre-dependency problem: google-chrome-stable:amd64 pre-depends on dpkg (>= 1.14.0) dpkg: error processing archive google-chrome

no internet inside docker-compose service

半腔热情 提交于 2021-02-06 14:26:51
问题 I cannot reach external network from docker-compose containers. Consider the following docker-compose file: version: '2' services: nginx: image: nginx Using the simple docker run -it nginx bash I manage to reach external IPs or Internet IPs ( ping www.google.com ). On the other hand if I use docker-compose and attach to the container, I cannot reach external IP addresses / DNS. docker info: Containers: 0 Running: 0 Paused: 0 Stopped: 0 Images: 1 Server Version: 1.12.1 Storage Driver: aufs

no internet inside docker-compose service

♀尐吖头ヾ 提交于 2021-02-06 14:24:40
问题 I cannot reach external network from docker-compose containers. Consider the following docker-compose file: version: '2' services: nginx: image: nginx Using the simple docker run -it nginx bash I manage to reach external IPs or Internet IPs ( ping www.google.com ). On the other hand if I use docker-compose and attach to the container, I cannot reach external IP addresses / DNS. docker info: Containers: 0 Running: 0 Paused: 0 Stopped: 0 Images: 1 Server Version: 1.12.1 Storage Driver: aufs

no internet inside docker-compose service

我的梦境 提交于 2021-02-06 14:24:25
问题 I cannot reach external network from docker-compose containers. Consider the following docker-compose file: version: '2' services: nginx: image: nginx Using the simple docker run -it nginx bash I manage to reach external IPs or Internet IPs ( ping www.google.com ). On the other hand if I use docker-compose and attach to the container, I cannot reach external IP addresses / DNS. docker info: Containers: 0 Running: 0 Paused: 0 Stopped: 0 Images: 1 Server Version: 1.12.1 Storage Driver: aufs

(Docker) How to install dependencies, using separate Composer container, in WordPress container?

陌路散爱 提交于 2021-02-06 14:02:27
问题 Dockerfile FROM wordpress ENV REFRESHED_AT 2015-08-12 ADD \ composer.json /var/www/html ADD \ composer.lock /var/www/html # install the PHP extensions RUN \ apt-get -qq update && \ apt-get -y upgrade && \ apt-get install -y vim wget && \ rm -rf /var/lib/apt/lists/* # Symlink User's "wp-content" folder into the newly installed Wordpress RUN \ rm -rf /usr/src/wordpress/wp-content/plugins/* && \ rm -rf /usr/src/wordpress/wp-content/themes/* && \ cp -fr /usr/src/wordpress/* /var/www/html/ && \

(Docker) How to install dependencies, using separate Composer container, in WordPress container?

我与影子孤独终老i 提交于 2021-02-06 14:01:10
问题 Dockerfile FROM wordpress ENV REFRESHED_AT 2015-08-12 ADD \ composer.json /var/www/html ADD \ composer.lock /var/www/html # install the PHP extensions RUN \ apt-get -qq update && \ apt-get -y upgrade && \ apt-get install -y vim wget && \ rm -rf /var/lib/apt/lists/* # Symlink User's "wp-content" folder into the newly installed Wordpress RUN \ rm -rf /usr/src/wordpress/wp-content/plugins/* && \ rm -rf /usr/src/wordpress/wp-content/themes/* && \ cp -fr /usr/src/wordpress/* /var/www/html/ && \