docker-compose

docker container can't connect to other container in different network

廉价感情. 提交于 2019-12-11 17:01:03
问题 I have 2 different containers running on my server(app and web_server). They are in the same network, because I put them in the same network and that network's driver is bridge. networks: app-network: driver: bridge Now, I have 3rd container, which needs to connect one of the 2 containers I mentioned. I try to connect from 3rd container to 1st container like this: app:9000 , but it says host not found. I guess this is because they are in different networks. What should I do to make it work?

Cant access consul webui docker compose

﹥>﹥吖頭↗ 提交于 2019-12-11 16:59:57
问题 Im trying to standup consul dev webui for traning purposes using docker compose. While consul claims to be running, when I try to visit localhost:8500/ui, the site is unreachable. My docker compose file: version: "3" services: cs1: image: consul:1.4.2 ports: - "8500:8500" command: "agent -dev -ui" The response from the console is cs1_1_6d8d914aa536 | ==> Starting Consul agent... cs1_1_6d8d914aa536 | ==> Consul agent running! cs1_1_6d8d914aa536 | Version: 'v1.4.2' cs1_1_6d8d914aa536 | Node ID:

Login with root credentials on Mongodb container created using Docker compose

▼魔方 西西 提交于 2019-12-11 16:59:54
问题 I am creating a docker container for a mongod server following the suggestions made here. My docker compose file looks as follows: version: '3.2' services: mongo: container_name: mongo image: mongo restart: always environment: MONGO_INITDB_ROOT_USERNAME: admin MONGO_INITDB_ROOT_PASSWORD: admin volumes: - ./data:/data/db ports: - "27017:27017" I then build and run the container using the docker compose command: docker-compose up --build In the start up logs I can see the user being created:

docker run on container but not run on server [duplicate]

倖福魔咒の 提交于 2019-12-11 16:47:32
问题 This question already has answers here : docker running but can't access on the server (2 answers) Closed 3 months ago . i create Jenkinsfile, Dockerfile, Dockerfile.test to CI and CD my server API on GitHub, i build it on Jenkins and the build was successfully, and my docker run on the container as well, on Jenkinsfile stages, i create for test and deploy on server API, and using docker for the container i also run Jenkins on docker also, using docker-compose here is my Dockerfile on my

How may I gett an SSH tunnel from local docker to remote DB working, using kingsquare and docker-compose

旧时模样 提交于 2019-12-11 16:22:27
问题 My new responsibility is porting our project into dockers. This means local code on each developer machine with test data on a staging server. At the moment, the code lives on the same server and thus uses local host (127.0.0.1) to connect to the database. The docker currently deploys and can run unit tests, which succeed in cases where no DB is required. I've tried using the answers provided here: https://github.com/phpmyadmin/docker/issues/99 which failed at the time and with a variety of

Monitoring Elassandra with Prometheus using Docker

£可爱£侵袭症+ 提交于 2019-12-11 16:12:54
问题 I'm trying to run jmx-exporter container with special configuration following this instruction. I did all the instructions step-by-step. Here is my docker-compose file and conf/config.yml . docker-compose: version: '2' services: prometheus: image: prom/prometheus container_name: prometheus volumes: - /prometheus:/prometheus - ./conf/prome.yml:/etc/prometheus/prometheus.yml command: - --config.file=/etc/prometheus/prometheus.yml ports: - '6009:9090' jmx-exporter: image: sscaling/jmx-prometheus

How do I connect containers in different networks in Docker Compose?

对着背影说爱祢 提交于 2019-12-11 15:57:21
问题 --- version: '3.7' networks: sydney: name: sydney london: name: london services: sydney-service: image: whatever hostname: sydney-service container_name: sydney-service networks: - sydney london-service: image: whatever hostname: london-service container_name: london-service environment: PAIR_SERVER: sydney-service:8080 # doesn't work networks: - london I have multiple networks in a docker compose file. As different services are in different networks they do not see each other. How do I

Can docker-compose share an ip between services with discrete ports?

空扰寡人 提交于 2019-12-11 15:49:31
问题 We currently have docker containers with complex builds using supervisord so that we can group services together. For example, nginx and ssh. I'm attempting to rebuild these with more service-driven isolation linked by shared volumes. However, without mapping the IP to the host , I can't seem to find a way to allow IP addresses to be shared even though the ports may be discrete. What I'm trying to do is something like this: version: '2' services: web: image: nginx volumes: - /data/web:/var

Java & Kafka: Connection to node 999 could not be established. Broker may not be available

非 Y 不嫁゛ 提交于 2019-12-11 15:49:19
问题 My docker-compose.yml is version: "2.1" services: pg-master: image: postgres-9.6:3 ports: - "5432:5432" environment: - VIRTUAL_HOST=postgres.local web: build: . links: - pg-master:postgres.local ports: - "8080:8080" zookeeper: image: jplock/zookeeper:3.4.6 ports: - "2181:2181" kafka: image: wurstmeister/kafka:1.0.0 ports: - "9092:9092" environment: - KAFKA_ADVERTISED_HOST_NAME=localhost - KAFKA_ADVERTISED_PORT=9092 - KAFKA_CREATE_TOPICS=TestTopic1:3:1 - KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181

Docker flask - jinja2.exceptions.TemplateNotFound: index.html

假如想象 提交于 2019-12-11 15:42:19
问题 New to docker and trying to run a flask mysql app but getting a jinja2.exceptions.TemplateNotFound: index.html . No errors if I run python app.py outside of docker Directory structure -docker-compose.yml -app -templates -index.html -app.py -Dockerfile -requirements.txt -db -init.sql docker-compose.yml version: "2" services: app: build: ./app links: - db ports: - "5000:5000" db: image: mysql:5.7 ports: - "32000:3306" environment: MYSQL_ROOT_PASSWORD: root volumes: - ./db:/docker-entrypoint