docker-compose

How do I set up a DNS container inside docker-compose?

随声附和 提交于 2019-12-24 17:28:28
问题 I think this may be an XY problem, so I'll include the context of the question since I don't know the best way to solve this problem. I have a kubernetes environment set up on AWS such that I have two parts, an nginx container, and a backend service (which I'll call SvcA). Since the backend service can come and go, in my nginx config I have something that looks like: resolver kube-dns.kube-system.svc.cluster.local valid=60s ipv6=off; server { # stuff location / { set $backend "SvcA.default

how to map database from couchdb container to another containers webapp in same docker-compose file

 ̄綄美尐妖づ 提交于 2019-12-24 15:53:14
问题 I am having one web application which is running with couchdb database. This coudb container has multiple databases from which web application need only one database. I am using docker compose to run it but web application didn't recognize database inside couchdb container by docker-compose.yml file as below version: "2" services: db: image: mysite/couch:latest ports: - "15984:5984" environment: DB_USER: admin DB_PASSWORD: password DB_NAME: db_new webapp: image: mysite/webapp:latest ports: -

Docker multiple MySQL containers with persistence

这一生的挚爱 提交于 2019-12-24 15:42:51
问题 I am trying to setup two MySQL containers and one data-only container for persisting MySQL data using Docker Compose. Here is docker-compose.yml: db1: image: mysql volumes_from: - data environment: - MYSQL_ROOT_PASSWORD=password db2: image: mysql volumes_from: - data environment: - MYSQL_ROOT_PASSWORD=password data: image: mysql volumes: - /var/lib/mysql entrypoint: /bin/echo However, both mysql daemons have conflict, because they need a separate data directory: [Note] InnoDB: Check that you

Spring Docker container cannot access Postgres Docker container

半腔热情 提交于 2019-12-24 13:37:25
问题 The Dockerfile of my spring-boot app: FROM openjdk:8-jdk-alpine VOLUME /tmp COPY target/media-0.0.1-SNAPSHOT.jar app.jar ENTRYPOINT ["java", "-jar", "/app.jar"] application.yml spring: datasource: url: jdbc:postgresql://localhost:5432/media username: postgres password: postgres hikari: connectionTimeout: 30000 and here is the docker-compose.yml : version: '3' services: db: image: postgres ports: - "5432:5432" environment: POSTGRES_DB: media POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres

wait for other deployments to start running before other can be created?

别等时光非礼了梦想. 提交于 2019-12-24 12:22:42
问题 I am creating the deployments/services using REST APIs. I send POST request with bodies which contain the JSON objects which create the applications on Openshift. After I call all the APIs, these objects get instantiated. I have 2 deployments which are dependent on mongodb deployment but this mongodb takes a little longer to start running, while the two deployments which are dependent on mongodb start running earlier. This breaks the code inside the 2 deployments as the mongodb connection

Host key verification failed when building image with docker-compose from a private repo over ssh

萝らか妹 提交于 2019-12-24 11:27:19
问题 Inside my docker-compose.yml I'm using ssh address context to build a Docker image. ui: build: context: git@my.git.host:ui/ui.git dockerfile: Dockerfile.prod container_name: ui ports: - "4200:4200" command: ember serve Running docker-compose build ui gives me : compose.cli.verbose_proxy.proxy_callable: docker build -> <generator object APIClient._stream_helper at 0x7faa8bc107d8> ERROR: compose.cli.errors.log_api_error: error fetching: Host key verification failed. fatal: Could not read from

Can Docker client(within container) talk to docker daemon on EC2 using UNIX socket?

柔情痞子 提交于 2019-12-24 10:35:11
问题 As part of Jenkins docker image, am supposed to install docker client(only), that can talk to docker daemon installed on underlying EC2 instance. UNIX socket, I mean socket(AF_UNIX,,) Background As per the instruction, given here, I do not see the necessity to install docker daemon withink jenkins image, because the author is using UNIX socket to talk to underlying docker daemon running in EC2 instance, as shown here. My understanding is, installing docker client installation(only) within

How to connect external service from docker service

孤街浪徒 提交于 2019-12-24 10:12:10
问题 I am a newbie to docker. I am running Postgresql running on my local machine (i.e. On Mac OS). My application is running in docker. What I want is my application should be able to access PostgreSQL(has got a lot of production data, which can`t be run on docker) service from docker. How to do it? Could anyone give me an example of doing so? Many thanks in advance 回答1: Finally, I found a solution to link external services inside docker. Added below lines in the docker-compose.yaml : extra_hosts

NGINX reverse proxy not working for .NET core webAPI running in Docker

廉价感情. 提交于 2019-12-24 10:02:32
问题 I have a simple example webAPI in .NET core, running in a docker container. I'm running Nginx also in a docker container as a reverse proxy for https redirection. The webAPI is accessible on http, but when accessing the https url, the API is not responding. I have tried many different configurations in the nginx.conf file. I've tried using localhost, 0.0.0.0, and 127.0.0.1. I've tried using several different ports such as 5000, 8000, and 80. I've tried using upstream and also specifying the

How to add a docker container to an existing docker network

非 Y 不嫁゛ 提交于 2019-12-24 09:07:36
问题 I have the following challenge with docker: I have a postgres service up and running which is managed by a docker-compose and works just fine. Now, I want to build additional but isolated docker services that connect to this postgres database (an do an analytical task for instance) and can read and write data from there. I understand that I could just grow my docker-compose file, however I want to keep this slim and tidy. So, my idea is to put each additional service in its own docker image