docker-compose

From docker-compose to AWS

◇◆丶佛笑我妖孽 提交于 2019-12-24 20:14:02
问题 I have a docker-compose.yml : version: '2' services: scheduler: build: context: . dockerfile: Dockerfile hostname: dask-scheduler ports: - "8786:8786" - "8787:8787" command: dask-scheduler worker: build: context: . dockerfile: Dockerfile hostname: dask-worker ports: - "8789:8789" command: dask-worker scheduler:8786 and the Dockerfile : FROM continuumio/miniconda3 RUN apt-get update && apt-get install -y build-essential freetds-dev RUN mkdir project COPY requirements.txt /project/requirements

How can I mount an absolute host path as a named volume in docker-compose?

主宰稳场 提交于 2019-12-24 20:09:32
问题 I've already tried the solution in this stackoverflow thread. It did not work for me, as shown below. Here's my docker-compose.yml file: version: "3.7" services: db: image: mysql volumes: - data:/var/lib/mysql volumes: data: driver_opts: type: none device: /usr/local/opt/mysql/mywebsite.com o: bind Here's the result of docker-compose up : $ docker-compose up Creating volume "mycontainer_data" with default driver Recreating 45bc03b2c674_mycontainer_db_1 ... error ERROR: for 45bc03b2c674

Can't get config files when run ConfigServer and EurekaServer on docker container

北慕城南 提交于 2019-12-24 20:00:27
问题 [Spring boot Microservies] I have a microservices includes 2 services: ConfigService and DiscoveryService ConfigService is enabled ConfigServer, keep files config for microservice DiscoveryService is EurekaServer. It will get config file from ConfigService When run 2 service on local (not docker), everything is good Fetching config from server at: http://localhost:8088 Located environment: name=epl-discovery-service, profiles=[default], label=null, version

redis docker - create a container with data

谁说我不能喝 提交于 2019-12-24 19:39:47
问题 I want to run a redis container with initial data in it. In the documentation of the image, I can use a volume to mount to /data . My question is: will redis be able to read the data from it and load it? And if so, what should be in the directory that I mount? My (very naive) attempt was to put a file with name "someFile" and hopefully redis will know to save it with key "someFile" and the content of the file as the data. Obviously it didn't work. Any help would be appreciated. 回答1: You can

Docker-compose scale command creates random ports for new containers

…衆ロ難τιáo~ 提交于 2019-12-24 19:16:19
问题 Currently docker-compose scale command creates random ports for the new containers. Is there a way to specify a port for the new containers? 回答1: In your docker-compose.yml , postgres: image: postgres:9.5 environment: - POSTGRES_PASSWORD=postgres ports: - 5432:5432 it will bind to 5432 , however, note that you can't have more than one instance on the same node for obvious reason. To use multiple instances on one node you can use dynamic ports like this postgres: image: postgres:9.5

how to view log output when developing in Visual Studio code's Remote Container

守給你的承諾、 提交于 2019-12-24 19:13:59
问题 I have a django (web) - celery - redis - postgresql (db) project that uses docker. If I run the project with docker-compose up I get the expected logs in the terminal: redis_1 | 1:M 28 Jul 2019 17:13:32.765 * Ready to accept connections db_1 | LOG: database system was interrupted; last known up at 2019-07-28 17:06:03 UTC ... db_1 | LOG: autovacuum launcher started celery_1 | celery_1 | -------------- celery@c044cee5822e v4.3.0 (rhubarb) celery_1 | ---- **** ----- ... However if I use the

How to setup a 3-node Elasticsearch cluster on a single AWS EC2 instance?

一笑奈何 提交于 2019-12-24 19:06:54
问题 I am currently trying to deploy a 3-node Elasticsearch cluster on a single EC2 instance (i.e. using ONE instance only) using a docker-compose file. The problem is I could not get the 3 nodes to communicate with each other to form the cluster. On my Windows 10 machine, I used the official Elasticsearch:6.4.3 image while for AWS EC2, I am using a custom Elasticsearch:6.4.3 image with ec2-discovery plugin installed where I build using the " docker build -t mdasri/eswithec2disc . " command. Refer

How to pass variables in .env file to angular6 environment.ts file

拟墨画扇 提交于 2019-12-24 18:33:15
问题 With angular6 , the global variable process is undefined. I dockerlize my angular app using docker-compose.yml and Dockerfile I create .env file store my secret variables used by docker-compose.yml But, if I get the variables stored in .env file in application code like this: process.env.GITHUB_ACCESS_TOKEN An error will be thrown ERROR in src/app/app.module.ts(41,58): error TS2304: Cannot find name 'process'. src/app/app.module.ts(53,12): error TS2304: Cannot find name 'process'. My

Windows 10 bind mounts in docker-compose not working

邮差的信 提交于 2019-12-24 18:23:26
问题 I'm using docker-compose to manage a multi container application. 1 of those containers needs access to the contents of a directory on the host. This seems simple according to the various sources of documentation on docker and docker-compose but I'm struggling to get it working. event_processor: environment: - COMPOSE_CONVERT_WINDOWS_PATHS=1 build: ./Docker/event_processor ports: - "15672:15672" entrypoint: python -u /src/event_processor/event_processor.py networks: - app_network volumes: - C

using docker-compose on a kubernetes instance with jenkins - mounting empty volumes

老子叫甜甜 提交于 2019-12-24 18:09:58
问题 I have a Jenkins instance setup using Googles Jenkins on Kubernetes solution. I have not changed any of the settings of the Kubernetes Pod. When I trigger a new job I am successfully able to get everything up and running until the point of my tests. My tests use docker-compose. First I make sure to install docker (1.5-1+b1) and docker-compose (1.8.0-2) on the instance (I know I can optimize this by using an image that already includes these, but I am still just in proof-of-concept). When I