docker-compose

Docker swarm service port not exposed

我的梦境 提交于 2020-01-06 08:59:18
问题 I cannot connect to a service running on docker swarm. The swarm seems ok because I can connect to other containers running on it. I running the service with docker stack deploy -c docker-compose.yaml nifi and the docker compose file is: version: "3.3" services: registry: image: apache/nifi-registry:0.3.0 ports: - "18080:18080" deploy: replicas: 1 restart_policy: condition: on-failure When I run this without the swarm i.e. docker-compose -f docker-compose.yaml up it works fine and I can

Spring Cloud Netflix | Eureka not registering when deployed on ECS

北战南征 提交于 2020-01-06 08:47:10
问题 I am trying to deploy Spring Netflix Eureka and related microservice application using ECS and Cloudformation. Eureka is not able to register the related microservices because the docker images are not able to link on hostname. Please suggest what should be the best solution to handle this. 回答1: You should use EC2 instance's host ip instead of docker container host's. In your microservices (if those are spring boot applications), put this code: @Bean @Profile("docker") public

Docker Swarm : docker stack deploy results on untagged images <none>

不羁岁月 提交于 2020-01-06 08:45:12
问题 I'm deploying some images from my registry into my application server using docker swarm mode hos t : My image in the registry is looking like this (executing docker images ) : REPOSITORY TAG IMAGE ID CREATED SIZE localhost:5000/myApp G02R00C09_myTag c1fc2242f9a0 2 hours ago 272MB Under my docker compose file , my service looks like this : --- version: '3.4' services: ihm: image: myRegistryServer:5000/myApp:G02R00C09_myTag stdin_open: true volumes: - /opt/logs:/opt/logs tty: true ports: -

How do you configure Vagrant so host can communicate with kafka-docker running on VM?

老子叫甜甜 提交于 2020-01-06 08:04:35
问题 I have kafka-docker running on a Vagrant Ubuntu VM. I can produce and consume messages to it using NodeJs programs running on the VM. I am unable however to use the same NodeJs programs from the Windows host, the programs seem to reach but no answer is received. Here is my docker-compose.yml file: version: '2' services: zookeeper: image: "wurstmeister/zookeeper:latest" network_mode: "host" ports: - "2181:2181" kafka: image: "wurstmeister/kafka:latest" network_mode: "host" ports: - 9092:9092

How do you configure Vagrant so host can communicate with kafka-docker running on VM?

拈花ヽ惹草 提交于 2020-01-06 08:03:11
问题 I have kafka-docker running on a Vagrant Ubuntu VM. I can produce and consume messages to it using NodeJs programs running on the VM. I am unable however to use the same NodeJs programs from the Windows host, the programs seem to reach but no answer is received. Here is my docker-compose.yml file: version: '2' services: zookeeper: image: "wurstmeister/zookeeper:latest" network_mode: "host" ports: - "2181:2181" kafka: image: "wurstmeister/kafka:latest" network_mode: "host" ports: - 9092:9092

MongoDB and Docker via docker-compose auth error and not initalizing db

情到浓时终转凉″ 提交于 2020-01-06 07:56:08
问题 I am new to Docker and I have read the Mongo Docker Docs. I need some help setting up a simple application. I want a local mongodb that dumps / uses a database named "my_test_db" and writes to <project-dir>/mongo/my_test_db Here is my simple project: # project structure <project-dir>/ -- .env -- docker-compose.yml -- mongo/ -- + -- my_test_db/ The .env file: # <project>/.env MONGO_INITDB_ROOT_USERNAME=test_user MONGO_INITDB_ROOT_PASSWORD=test_pwrd MONGO_INITDB_DATABASE=my_test_db MONGO_DATA

Docker volume mapping sync files from guest to host

情到浓时终转凉″ 提交于 2020-01-06 06:34:08
问题 I created this basic Dockerfile expecting that test would become visible like html/test in host, but it didn't. I think because Docker creates an empty html dir in host and syncs that to guest. I tried with docker run and docker-compose, the results were the same. The thing is, when I do the same actions with the WordPress image from Dockerhub, I see it creates a directory on host, neatly syncing all files from /var/www/html in guest. So now I wonder how I can create the same behaviour.

How to run docker-compose with host network?

↘锁芯ラ 提交于 2020-01-06 05:44:28
问题 I was reading a, here, here, here, here, here none of which answers my question. What I want to do? I have a mysql docker-compose image and want to connect to it from my ubuntu host using localhost:3306 this does not work it does work if I use 0.0.0.0:3306 which is not what I want to do. Why do I want to do all of that? because I have to start to work on an oooold legacy app, that has an old mysql version. Now I have mysql 8.0 on my computer and dont want to downgrade just for that one

how to set env variables in my CMD script

☆樱花仙子☆ 提交于 2020-01-06 05:30:10
问题 I have the following entryfile FROM <image-of-nodejs> COPY docker/node/entry.sh /var/entries/entry.sh RUN apt-get update RUN apt-get install ant -y CMD ["/var/entries/entry.sh"] the image is used by a docker-compose file: version: "3.3" services: my_node: build: context: ./ dockerfile: docker/node/Dockerfile-build-dev volumes: - type: bind source: ./ target: /var/proj and the entry.sh file is the following: #!/bin/bash export QNAMAKER_SUB_KEY=b13615t If I then start the image and I enter the

Docker connect NodeJS container with Apache container in front end JS

谁都会走 提交于 2020-01-06 05:27:10
问题 I am building a chat application that i am implementing in Docker. I have a NodeJS container with socket.io and a container with apache server and website on it. The thing is i need to connect to the website(with javascript) to the NodeJS server. I have looked at the Docker-compose docks and read about networking. The docs said that the address should be the name of the container. But when i try that i get the following error in my browser console: GET http://nodejs:3000/socket.io/socket.io