docker-compose

ASPNETCORE_ENVIRONMENT in Docker

别说谁变了你拦得住时间么 提交于 2020-06-27 06:40:12
问题 i have problems setting the ASPNETCORE_ENVIRONMENT variable running my project in a docker container . The problem is that the value is always set/overwritten to "Development" . I have tried setting the environment variable in my Dockerfile using ENV ASPNETCORE_ENVIRONMENT test also tried setting the environment variable in my docker-compose file using environment: - ASPNETCORE_ENVIRONMENT=test When I set any other environment variable it works , for example: environment: - OTHER_TEST

Accessing Elasticsearch Docker instance using NEST

纵饮孤独 提交于 2020-06-26 13:38:53
问题 I run a simple Elasticsearch instance using Docker Compose: --- version: '2' services: elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:6.1.1 hostname: elasticsearch environment: - cluster.name=docker-cluster - bootstrap.memory_lock=true - ES_JAVA_OPTS=-Xms512m -Xmx512m ulimits: memlock: soft: -1 hard: -1 mem_limit: 1g ports: - 9200:9200 kibana: image: docker.elastic.co/kibana/kibana:6.1.1 environment: SERVER_NAME: "0.0.0.0" ELASTICSEARCH_URL: http://elasticsearch:9200

Accessing Elasticsearch Docker instance using NEST

安稳与你 提交于 2020-06-26 13:37:54
问题 I run a simple Elasticsearch instance using Docker Compose: --- version: '2' services: elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:6.1.1 hostname: elasticsearch environment: - cluster.name=docker-cluster - bootstrap.memory_lock=true - ES_JAVA_OPTS=-Xms512m -Xmx512m ulimits: memlock: soft: -1 hard: -1 mem_limit: 1g ports: - 9200:9200 kibana: image: docker.elastic.co/kibana/kibana:6.1.1 environment: SERVER_NAME: "0.0.0.0" ELASTICSEARCH_URL: http://elasticsearch:9200

Why does the docker-compose healthcheck of my mongo container always fail?

依然范特西╮ 提交于 2020-06-24 12:56:09
问题 I'm using docker-compose to stand up an Express/React/Mongo app. I can currently stand up everything using retry logic in the express app. However, I would prefer to use Docker's healthcheck to prevent the string of errors when the containers initially spin up. However, when I add a healthcheck in my docker-compose.yml , it hangs for the interval/retry time limit and exits with: ERROR: for collector Container "70e7aae49c64" is unhealthy. ERROR: for server Container "70e7aae49c64" is unhealthy

docker-compose.yml for elasticsearch 7.0.1 and kibana 7.0.1

房东的猫 提交于 2020-06-24 11:54:43
问题 I am using Docker Desktop with linux containers on Windows 10 and would like to launch the latest versions of the elasticsearch and kibana containers over a docker compose file. Everything works fine when using some older version like 6.2.4. This is the working docker-compose.yml file for 6.2.4. version: '3.1' services: elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:6.2.4 container_name: elasticsearch ports: - "9200:9200" volumes: - elasticsearch-data:/usr/share

Docker-compose , anyway to specify a redis.conf file?

ⅰ亾dé卋堺 提交于 2020-06-24 10:59:49
问题 my redis container is defined as he standard image in my docker_compose.yml redis: image: redis ports: - "6379" I guess it's using standard settings like binding to Redis at localhost I need to bind it to 0.0.0.0, is there anyway to add a local redis.conf file to change the binding and let docker-compose knows it? thanks for any trick... 回答1: Yes. Just mount your redis.conf over the default with a volume: redis: image: redis volumes: - ./redis.conf:/usr/local/etc/redis/redis.conf ports: -

How to define build-args in docker-compose?

筅森魡賤 提交于 2020-06-24 08:10:31
问题 I have the following docker-compose file version: '3' services: node1: build: node1 image: node1 container_name: node1 node2: build: node2 image: node2 container_name: node2 I can build both images and start them with a single command docker-compose up -d --build But I would like to use build-args on the builds. The original build script of the image outside of the scope of compose looks something like this #!/bin/sh docker build \ --build-arg ADMIN_USERNNAME_1=weblogic \ --build-arg ADMIN

Could not translate host name “db” to address using Postgres, Docker Compose and Psycopg2

限于喜欢 提交于 2020-06-24 06:13:18
问题 In one folder I have 3 files: base.py, Dockerfile and docker-compose.yml. base.py: import psycopg2 conn = psycopg2.connect("dbname='base123' user='postgres' host='db' password='pw1234'") Dockerfile: FROM ubuntu:16.04 RUN apt-get update RUN apt-get -y install python-pip RUN apt-get update RUN pip install --upgrade pip RUN pip install psycopg2-binary COPY base.py base.py RUN python base.py docker-compose.yml: version: '3' services: db: image: 'postgres:latest' expose: - "5432" environment:

Could not translate host name “db” to address using Postgres, Docker Compose and Psycopg2

ぃ、小莉子 提交于 2020-06-24 06:13:14
问题 In one folder I have 3 files: base.py, Dockerfile and docker-compose.yml. base.py: import psycopg2 conn = psycopg2.connect("dbname='base123' user='postgres' host='db' password='pw1234'") Dockerfile: FROM ubuntu:16.04 RUN apt-get update RUN apt-get -y install python-pip RUN apt-get update RUN pip install --upgrade pip RUN pip install psycopg2-binary COPY base.py base.py RUN python base.py docker-compose.yml: version: '3' services: db: image: 'postgres:latest' expose: - "5432" environment:

Run docker service on HTTPS

左心房为你撑大大i 提交于 2020-06-24 03:17:06
问题 Currently, I run a simple docker container by using the following files. DockerFile FROM microsoft/aspnet:4.7.1 WORKDIR /inetpub/wwwroot EXPOSE 80 COPY index.html . docker-compose.yml version: '3.4' services: testapp: image: mytestapp:${TAG:-latest} build: context: . dockerfile: Dockerfile docker-compose.override.yml version: '3.4' services: testapp: ports: - "9091:80" I use windows image to create my container by using the following command and I can access it by http://localhost:9091/.