docker-networking

Docker Swarm container with MACVLAN network gets wrong gateway - no internet access

China☆狼群 提交于 2020-01-16 09:13:20
问题 I need a service within a Docker Swarm stack which has one additional interface based on a macvlan network. This is cause the JBoss Cluster in this service needs to communicate via IP multicast, which is currently not supported in overlay networks. I have created the macvlan network like that: # Worker 1: docker network create --config-only --subnet 10.140.0.0/16 -o parent=ens224.800 --ip-range 10.140.1.0/24 swarm-multicast-config-only # Worker 2: docker network create --config-only --subnet

Slow network performance in Docker container

非 Y 不嫁゛ 提交于 2020-01-05 04:27:11
问题 I'm running the latest docker/ docker-machine on OSX Yosemite and VirtualBox and I'm trying to connect to a lein ring server running in a container from the host the loading is slow as in like Load time is over 1 min The following is my configuration Docker 1.12.0 Docker Machine 0.8.0 VirtualBox 5.0.24 My Docker Machine "ConfigVersion": 3, "Driver": { "IPAddress": "192.168.99.100", "MachineName": "default", "SSHUser": "docker", "SSHPort": 49478, "SSHKeyPath": "/Volumes/NASMAC/VMs/.docker

How to access container from another compose that connected to external network?

烈酒焚心 提交于 2020-01-03 19:31:12
问题 Here is compose file with config of container that I wish to connect to from external container (defined in another compose file): version: '3.5' services: service-to-connect-to: build: . networks: - my-external-network networks: my-external-network: external: true and another compose file that contains config for container from which I wish to connect to service-to-connect-to : version: "3.5" services: service-to-connect-from: build: . I tried to connect to service-to-connect-to via this

Docker service discovery does not work with default bridge

亡梦爱人 提交于 2020-01-02 07:25:54
问题 Seems like docker service discovery just works with user defined networks and not with default bridge (docker0) , but I didn't find anything in the docs. docker run --rm -d --name c1 alpine sleep 2h docker run --rm -d --name c2 alpine sleep 2h docker exec -ti c1 ping c2 It gives me ping: bad address 'c2' But if I create a custom bridge network everthing works fine: docker network create u-bridge docker run --rm -d --name u1 --net u-bridge alpine sleep 2h docker run --rm -d --name u2 --net u

Unable to reach web server in Docker swarm from the host

无人久伴 提交于 2019-12-24 10:18:36
问题 I'm starting out using Docker on macOS, and get stuck when trying to complete part 4 of the Get Started guide. I have created two extra virtual machines ( myvm1 and myvm2 ), set myvm1 as swarm manager, and myvm2 as a worker. I have then deployed a stack with 5 Flask web servers using the docker-compose.yml from part 3 of the tutorial. The processes seem to start fine, and are distributed between the two machines, but I am not able to reach them from the host using a browser. How should I

Docker doesn't resolve hostname

主宰稳场 提交于 2019-12-22 08:29:06
问题 I need to know the hostnames (or ip addresses) of some container running on the same machine. As I already commented here (but with no answer yet), I use docker-compose . The documentation says, compose will automatically create a hostname entry for all container defined in the same docker-compose.yml file: Each container for a service joins the default network and is both reachable by other containers on that network, and discoverable by them at a hostname identical to the container name.

Connect to SQL Server in local machine (host) from docker using host.docker.internal

旧巷老猫 提交于 2019-12-22 01:18:11
问题 I'm trying to connect to my SQL Server instance running in my local computer using host.docker.internal (as recommended in https://docs.docker.com/docker-for-windows/networking/#use-cases-and-workarounds) The host.docker.internal is successfully resolved to an IP, and it's ping-able And I've opened up the port 1433 in my firewall configuration Error message Connection refused 192.168.65.2:1433 My connection string Data Source=host.docker.internal,1433;Initial Catalog=;Persist Security Info

Can (or should) 2 docker containers interact with each other via localhost?

若如初见. 提交于 2019-12-21 08:24:03
问题 We're dockerizing our micro services app, and I ran into some discovery issues. The app is configured as follows: When the a service is started in 'non-local' mode, it uses Consul as its Discovery registry. When a service is started in 'local' mode, it automatically binds an address per service (For example, tcp://localhost:61001, tcp://localhost:61002 and so on. Hard coded addresses) After dockerizing the app (for local mode only, for now) each service is a container (Docker images

Can (or should) 2 docker containers interact with each other via localhost?

自作多情 提交于 2019-12-21 08:23:54
问题 We're dockerizing our micro services app, and I ran into some discovery issues. The app is configured as follows: When the a service is started in 'non-local' mode, it uses Consul as its Discovery registry. When a service is started in 'local' mode, it automatically binds an address per service (For example, tcp://localhost:61001, tcp://localhost:61002 and so on. Hard coded addresses) After dockerizing the app (for local mode only, for now) each service is a container (Docker images

Docker Networking - nginx: [emerg] host not found in upstream

一世执手 提交于 2019-12-18 10:17:48
问题 I have recently started migrating to Docker 1.9 and Docker-Compose 1.5's networking features to replace using links. So far with links there were no problems with nginx connecting to my php5-fpm fastcgi server located in a different server in one group via docker-compose. Newly though when I run docker-compose --x-networking up my php-fpm, mongo and nginx containers boot up, however nginx quits straight away with [emerg] 1#1: host not found in upstream "waapi_php_1" in /etc/nginx/conf.d