docker-swarm

docker container hostname sequential number

喜你入骨 提交于 2020-03-18 14:03:32
问题 Is there any option to have the hostname / containername to have some seq numbers in case of replicas/scale in docker swarm? version: '3' services: serA: image: someimage1 hostname: serA serB: image: someimage2 tty: true hostname: serB{{.Node.index}} deploy: replicas: 2 For ex: I would like to have the hostnames as serB1 and serB2 回答1: AFAIK this is not supported and won't be supported as the Docker team thinks it's a bad idea: After some thought, I don't think this is a good idea. We might

Docker Swarm with springboot app

人走茶凉 提交于 2020-02-07 03:40:28
问题 I'm currently trying to deploy an application with docker swarm in 3 virtual machines, I'm doing it through docker-compose to create the image, my files are the following: Dockerfile: FROM openjdk:8-jdk-alpine WORKDIR /home ARG JAR_FILE ARG PORT VOLUME /tmp COPY ${JAR_FILE} /home/app.jar EXPOSE ${PORT} ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/home/app.jar"] and my docker-compose is: version: '3' services: service_colpensiones: build: context: ./colpensiones

SQLite DB on NFS in cluster. Will I get data corruption?

南笙酒味 提交于 2020-02-05 09:02:21
问题 I use SQLite for a database which I want to persist on an NFS. Any VM in my cluster might shut down at some point in which case docker swarm will spin up a replica on another VM to take over. Unfortunately the NFS seems not to support file locking so I turned it off (by mounting with "nolock") now I worry if I can be sure that the data will not be corrupted. Scenarios I could think of are: One of the VMs was simply disconnected from the internet just long enough for another replica to spin up

docker swarm list dependencies of a service

試著忘記壹切 提交于 2020-02-04 01:30:33
问题 Let's say we have the following stack file: version: "3" services: ubuntu: image: ubuntu deploy: replicas: 2 restart_policy: condition: on-failure resources: limits: cpus: "0.1" memory: 50M entrypoint: - tail - -f - /dev/null logging: driver: "json-file" ports: - "80:80" networks: - webnet web: image: httpd ports: - "8080:8080" hostname: "apache" volumes: - "/var/run/docker.sock:/var/run/docker.sock" deploy: placement: constraints: [node.role == manager] resources: limits: memory: 32M

NodeJS is not detecting change in Docker Bind Mount until Swarm is restarted

这一生的挚爱 提交于 2020-01-25 02:49:48
问题 I'm building a NodeJS application on Docker in Swarm mode (single node). I'm using bind mount volume for NodeJS source code. Everything runs perfectly and I can see the output in localhost from NodeJS and Express, but when I change something in NodeJS code (which is in a bind mount volume), nothing changes. I have to restart my service to observe the changes. Earlier when I was working with Docker Compose only, it never happened, but now when I have switched to Swarm, I'm experiencing

Difference between Minikube, Kubernetes, Docker Compose, Docker Swarm, etc

对着背影说爱祢 提交于 2020-01-24 10:16:28
问题 I am new to cluster container management, and this question is the basis for all the freshers over here. I read some documentation, but still, my understanding is not too clear, so any leads.. helping to understand? Somewhere it is mentioned, Minikube is used to run Kubernetes locally. So if we want to maintain cluster management in my four-node Raspberry Pi, then Minikube is not the option? Does Minikube support only a one-node system? Docker Compose is set of instructions and a YAML file to

Difference between Minikube, Kubernetes, Docker Compose, Docker Swarm, etc

混江龙づ霸主 提交于 2020-01-24 10:16:26
问题 I am new to cluster container management, and this question is the basis for all the freshers over here. I read some documentation, but still, my understanding is not too clear, so any leads.. helping to understand? Somewhere it is mentioned, Minikube is used to run Kubernetes locally. So if we want to maintain cluster management in my four-node Raspberry Pi, then Minikube is not the option? Does Minikube support only a one-node system? Docker Compose is set of instructions and a YAML file to

What benefits does Docker Compose have over Docker Swarm and Docker Stack?

南楼画角 提交于 2020-01-23 04:56:47
问题 From what I read it seems that Docker-Compose is a tool to create multiple containers on a single host while Docker Swarm is a tool that can do the exact same thing but with more control and on multiple hosts with the help of Docker Stack. I went through the tutorial and also came across this thread: docker-compose.yml vs docker-stack.yml what difference? And I'm coming to the conclusion that there's no reason to ever use Docker-Compose when you can use Docker Swarm with Docker Stack. They

Docker swarm multiple managers and workers Vs

不羁的心 提交于 2020-01-21 03:31:04
问题 I have a 3 node docker swarm cluster. We might want to have 2 managers. I know at one time there is only one leader. Since it is a 3 node cluster, I am trying to find some literature to understand what are the pros and cons of multiple managers. I need this info since in my 3 node cluster if I have 2 masters, 1 worker, what is the downside if I simply create 3 masters in a cluster. Any thoughts would be helpful. 回答1: A Docker swarm with two managers is not recommended . Why? Docker swarm

Hyperledger Composer - multi host installation

≯℡__Kan透↙ 提交于 2020-01-17 01:25:10
问题 I've been experimenting with Hyperledger Fabric, deployed over 2 VirtualBox Ubuntu images with docker swarm. But I have some issues when it comes to the Composer installation. Network Setup: Host1: Orderer, Peer1.Org1, Peer2.Org1, CLI Host2: Peer1.Org2, Peer2.Org2 When it comes to the Fabric setup everything appears to be ok. I'm able to start the network, join the peers from the second host, and update the anchor peers (one for each organisation). The Composer installation starts with