docker-networking

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

喜夏-厌秋 提交于 2019-12-04 20:18:35
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=False;User ID=;Password=;MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False

How to bind the published port to specific eth[x] in docker swarm mode

会有一股神秘感。 提交于 2019-12-04 18:48:20
问题 I'm trying to deploy my container to docker swarm cluster(docker engine 1.12.1). The features of docker swarm mode really are exciting, such as clustering docker, multi-host networking. However I find something can't be archived in swarm mode so far( docker 1.12.x ), which works well when using docker run to start container. My host has eth0 for Intranet network, eth1 for Internet network. I would like to only publish the service deployed by docker service create on Intranet network. But the

specify ip address for docker for mac

不羁岁月 提交于 2019-12-04 10:49:00
问题 I'm using Docker for Mac Beta and it runs from spotlight. Is there any way to run it from console or force to use any configuration file to specify ip address for docker host. Right now it changing from 192.168.64.3 to 192.168.64.5 (each start of docker it can have any random IP) probably I need to configure bridge interface? com.docker.network.bridge.enable_ip_masquerade: true com.docker.network.bridge.host_binding_ipv4: 0.0.0.0 Does anyone know how to do that? 回答1: You can connect to the

Docker swarm with a custom network

安稳与你 提交于 2019-12-04 03:41:25
I'm trying to work out how to properly use swarm mode in Docker. First I tried running containers on my 2 workers and manager machine without specifying a custom network (so I'm using the default ingress overlay network). However, If I use the ingress network, for some reason I cannot resolve tasks.myservice . So I tried configuring a custom network like this: docker network create -d overlay elasticnet So now, when I bash into one of the containers, I can successfully resolve tasks.myservice but I can no longer access the port I've defined in my service creation under --publish externally

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

心不动则不痛 提交于 2019-12-04 02:21:52
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 orchestrated with docker-compose. And with docker-machine, if that matters) But one service can not interact

Start container with multiple network interfaces

走远了吗. 提交于 2019-12-03 04:46:08
问题 With 1.9, is there a way to start a container directly with two or more network interfaces? You can do it after the container is started with "docker network connect", but it means the process is already running and might miss the creation of the new one. 回答1: This question is top doing a search regarding docker and multiple network interfaces. Although is not the required version in the question I leave here some info: With Docker 1.12+ it's possible to add more than one network interface to

Start container with multiple network interfaces

我的梦境 提交于 2019-12-02 17:58:22
With 1.9, is there a way to start a container directly with two or more network interfaces? You can do it after the container is started with "docker network connect", but it means the process is already running and might miss the creation of the new one. This question is top doing a search regarding docker and multiple network interfaces. Although is not the required version in the question I leave here some info: With Docker 1.12+ it's possible to add more than one network interface to a docker container, but it is needed to create the container first and then attach the second (and

Having trouble communicating between docker-compose services

谁都会走 提交于 2019-12-02 17:10:57
问题 I have the following docker-compose file: version: "3" services: scraper-api: build: ./ATPScraper volumes: - ./ATPScraper:/usr/src/app ports: - "5000:80" test-app: build: ./test-app volumes: - "./test-app:/app" - "/app/node_modules" ports: - "3001:3000" environment: - NODE_ENV=development depends_on: - scraper-api Which build the following Dockerfile 's: scraper-api (a python flask application): FROM python:3.7.3-alpine WORKDIR /usr/src/app COPY requirements.txt ./ RUN pip install --no-cache

ECONNRESET when opening a large number of connection in small time period

ぐ巨炮叔叔 提交于 2019-12-02 14:03:28
问题 I have situation where I want to create large number of entities on orion. I am using docker version of Orion and mongo with this docker-compose. version: "3" services: mongo: image: mongo:3.4 volumes: - /data/docker-mongo/db:/data/db - /data/docker-mongo/log/mongodb.log:/var/log/mongodb/mongod.log command: --nojournal orion: image: fiware/orion volumes: - /data/docker-mongo/log/contextBroker.log:/tmp/contextBroker.log links: - mongo ports: - "1026:1026" command: -dbhost mongo Now problems

Having trouble communicating between docker-compose services

谁都会走 提交于 2019-12-02 07:30:17
I have the following docker-compose file: version: "3" services: scraper-api: build: ./ATPScraper volumes: - ./ATPScraper:/usr/src/app ports: - "5000:80" test-app: build: ./test-app volumes: - "./test-app:/app" - "/app/node_modules" ports: - "3001:3000" environment: - NODE_ENV=development depends_on: - scraper-api Which build the following Dockerfile 's: scraper-api (a python flask application): FROM python:3.7.3-alpine WORKDIR /usr/src/app COPY requirements.txt ./ RUN pip install --no-cache-dir -r requirements.txt COPY . . CMD ["python", "./app.py"] test-app (a test react application for the