docker-compose

Connecting to RabbitMQ container with docker-compose

强颜欢笑 提交于 2020-05-11 05:23:59
问题 I want to run RabbitMQ in one container, and a worker process in another. The worker process needs to access RabbitMQ. I'd like these to be managed through docker-compose . This is my docker-compose.yml file so far: version: "3" services: rabbitmq: image: rabbitmq command: rabbitmq-server expose: - "5672" - "15672" worker: build: ./worker depends_on: - rabbitmq # Allow access to docker daemon volumes: - /var/run/docker.sock:/var/run/docker.sock So I've exposed the RabbitMQ ports. The worker

Connecting to RabbitMQ container with docker-compose

我怕爱的太早我们不能终老 提交于 2020-05-11 05:23:31
问题 I want to run RabbitMQ in one container, and a worker process in another. The worker process needs to access RabbitMQ. I'd like these to be managed through docker-compose . This is my docker-compose.yml file so far: version: "3" services: rabbitmq: image: rabbitmq command: rabbitmq-server expose: - "5672" - "15672" worker: build: ./worker depends_on: - rabbitmq # Allow access to docker daemon volumes: - /var/run/docker.sock:/var/run/docker.sock So I've exposed the RabbitMQ ports. The worker

docker-compose up is starting the container and immediately stopping them

谁说胖子不能爱 提交于 2020-05-11 05:22:04
问题 I am trying to build services using docker-compose but containers started using docker-compose is stopping immediately as compose script is over. But when i am creating container using docker run for the same service image it is working. Here is my compose script: version: '2.1' networks: composetestnetwork: driver: bridge ipam: driver: default config: - subnet: 172.19.0.0/16 gateway: 172.19.0.1 services: composetestdb: build: context: . dockerfile: Dockerfile-testdb cap_add: - ALL container

docker-compose up is starting the container and immediately stopping them

天涯浪子 提交于 2020-05-11 05:21:31
问题 I am trying to build services using docker-compose but containers started using docker-compose is stopping immediately as compose script is over. But when i am creating container using docker run for the same service image it is working. Here is my compose script: version: '2.1' networks: composetestnetwork: driver: bridge ipam: driver: default config: - subnet: 172.19.0.0/16 gateway: 172.19.0.1 services: composetestdb: build: context: . dockerfile: Dockerfile-testdb cap_add: - ALL container

What's the difference between pm2 and pm2-runtime?

一曲冷凌霜 提交于 2020-05-11 04:28:19
问题 I've been transferring some projects that have been executing on the same machine to individual dockers each. I've tried to use pm2 on one of these docker projects to make sure the service would restart if something go wrong (it's a volatile project) and some of the examples demands the Dockerfile to use pm2-runtime instead of pm2 . I've been searching for the differences of these two but I couldn't find something specific, could someone help? 回答1: The main difference between pm2 and pm2

Docker-compose disable output on one of containers

流过昼夜 提交于 2020-05-11 03:51:39
问题 I am using Codeship CI for my project. I have selenium tests and I am using remote browser from selenium/standalone-firefox but it's producing tons of logs, so I want to disable stdout for selenium/standalone-firefox container . Any ideas how I can do this? 回答1: Use --log-driver=none in docker run : docker run -d --log-driver=none selenium/standalone-firefox Or docker-compose.yml version: '2' services: selenium: ports: - "4444:4444" logging: driver: "none" image: selenium/standalone-firefox

Kafka setup with docker-compose

落花浮王杯 提交于 2020-05-09 21:06:49
问题 Hi I'm currently setting up Kafka with Docker. I've managed to setup Zookeeper and Kafka with the published confluent image, see following docker-compose file: version: '2' services: zookeeper: image: confluentinc/cp-zookeeper:3.2.0 container_name: zookeeper hostname: zookeeper ports: - "2181:2181" environment: ZOOKEEPER_CLIENT_PORT: 2181 ZOOKEEPER_TICK_TIME: 2000 restart: always kafka: image: confluentinc/cp-kafka:3.2.0 hostname: kafka container_name: kafka depends_on: - zookeeper ports: -

Docker swarm: 'build' configuration in docker compose file ignored during stack deployment

我与影子孤独终老i 提交于 2020-05-09 19:34:12
问题 We have created a docker compose file with multiple services. The images for these services are built in runtime using 'build' configuration option. The corresponding Dockerfile(s) are given in the respective directories. Sample docker compose file... version: '3' services: db2server: build: ./db2server ports: - "50005:50000" command: ["db2start"] appruntime: build: ./appruntime depends_on: - db2server This docker compose file works with docker-compose command. The images are built in runtime

Docker swarm: 'build' configuration in docker compose file ignored during stack deployment

半世苍凉 提交于 2020-05-09 19:31:19
问题 We have created a docker compose file with multiple services. The images for these services are built in runtime using 'build' configuration option. The corresponding Dockerfile(s) are given in the respective directories. Sample docker compose file... version: '3' services: db2server: build: ./db2server ports: - "50005:50000" command: ["db2start"] appruntime: build: ./appruntime depends_on: - db2server This docker compose file works with docker-compose command. The images are built in runtime

docker: MISCONF Redis is configured to save RDB snapshots

…衆ロ難τιáo~ 提交于 2020-05-09 11:59:37
问题 There are several issues similar to this one, such as: Redis is configured to save RDB snapshots, but it is currently not able to persist on disk - Ubuntu Server MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled but none of these solves my problem. The problem is that I am running my redis in docker-compose, and just cannot understand how to fix this at docker-compose startup. The redis docs say