docker-swarm

How to configure autoscaling on docker swarm?

亡梦爱人 提交于 2019-11-28 16:48:10
问题 I would like to know how to configure this tool to start with a minimum number of nodes and grow to a maximum number of nodes when it is required. Should I use another tool or can docker swarm solve this for me? 回答1: Short answer : There is no easy way to do this with Docker Swarm for now. Docker Swarm (or Swarm mode) does not support auto-scaling machines out of the box. You'd need to use another solution for that like docker-machine to create machines (with docker) on your infrastructure

docker swarm how to find out why service can't start

那年仲夏 提交于 2019-11-28 15:51:52
问题 I often have problems because a service that I deploy on docker swarm with multiple nodes won't start and there are not logs generated that I can look at with docker service logs {serviceName} There are many possible reasons for a service not to start such as Can't download image from registry Constraints that can't be fulfilled I have trouble finding out why a container won't start. I found the command docker service ps {serviceName} which List the tasks of one or more services and a short

How does Docker Swarm implement volume sharing?

放肆的年华 提交于 2019-11-28 15:46:38
Docker Swarm can manage two types of storage: volume and bind. While bind is not suggested by Docker Documentation since it create a binding between a local directory (on each swarm Node) to a task, volume method implementation is not mentioned, so I don't understand how volumes are shared between tasks. How Docker Swarm shares volumes between nodes? Where are volumes saved (on a manager? and if there are more than one manages?)? There is no problem between nodes if it runnings on different machines in different net? Does it create a VPN? What you're asking about is a common question. Volume

Marathon vs Kubernetes vs Docker Swarm on DC/OS with Docker containers

我的梦境 提交于 2019-11-28 14:57:19
I'm looking for some pros and cons of whether to go with Marathon and Chronos, Docker Swarm or Kubernetes when running Docker containers on DC/OS. For example, when is it better to use Marathon/Chronos than Kubernetes and vice versa? Right now I'm mostly into experimenting but hopefully we'll start using one of these services in production after the summer. This may disqualify Docker Swarm since I'm not sure if it'll be production ready by then. What I like about Docker Swarm is that it's essentially just "Docker commands" and you don't have to learn something completely new. We're already

nodejs app doesn't connect to localhost when running within a docker container

六眼飞鱼酱① 提交于 2019-11-28 13:12:51
My environment: Ubunut 17.04 LTS npm --version: 5.6.0 nodejs --version: 4.7.2 angular cli version: 1.6.4 docker-compose file: version: '3' services: my-app: build: context: . dockerfile: Dockerfile restart: unless-stopped volumes: - .:/usr/src/app ports: - "4200:4200" I commented out the EXPOSE 4200 in dockerfile because I'm already mounting it from docker-compose.yml file, is that NOT ok, should I expose in dockerfile and mount in docker-compose? Running npm start on command line launches the app successfully on the browser as I'm able to go to localhost:4200 and see the app running. However,

The relation between “docker/swarm” and “docker/swarmkit”

老子叫甜甜 提交于 2019-11-28 09:18:42
I am already familiar with docker/swarm , but find there occurs a "new" project: docker/swarmkit . But unfortunately, after reading the README , I still can't figure out what is the function of docker/swarmkit . Could anyoone help to elaborate the relations between docker/swarm and docker/swarmkit ? Why is docker/swarmkit born? Docker Swarm is an older (2014) Docker native orchestration tool. It is standalone from the Docker engine and serves to connect Docker engines together to form a cluster. It's then possible to connect to the Swarm and run containers on the cluster. Swarm has a few

execute a command within docker swarm service

自闭症网瘾萝莉.ら 提交于 2019-11-28 04:55:46
Initialize swarm mode: root@ip-172-31-44-207:/home/ubuntu# docker swarm init --advertise-addr 172.31.44.207 Swarm initialized: current node (4mj61oxcc8ulbwd7zedxnz6ce) is now a manager. To add a worker to this swarm, run the following command: Join the second node: docker swarm join \ --token SWMTKN-1-4xvddif3wf8tpzcg23tem3zlncth8460srbm7qtyx5qk3ton55-6g05kuek1jhs170d8fub83vs5 \ 172.31.44.207:2377 To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions. # start 2 services docker service create continuumio/miniconda3 docker service create --name redis

Using an IDE while developing on a docker container

一世执手 提交于 2019-11-28 04:54:12
There is something that I am not getting when developing an application while using docker containers. Lets say I am developing a java application and I set up a java container with jdk 8 base image, I still need to install java 8 jdk on my local development machine, since the IDE which I am going to use is going to look for runtime libraries on the local machine not the docker container. Is this right or am I missing something? Somethings I will be able to do entirely on the docker container like setting up a database but some things I will also have to do on my local development machine and

How does Docker Swarm implement volume sharing?

十年热恋 提交于 2019-11-27 09:14:25
问题 Docker Swarm can manage two types of storage: volume and bind. While bind is not suggested by Docker Documentation since it create a binding between a local directory (on each swarm Node) to a task, volume method implementation is not mentioned, so I don't understand how volumes are shared between tasks. How Docker Swarm shares volumes between nodes? Where are volumes saved (on a manager? and if there are more than one manages?)? There is no problem between nodes if it runnings on different

execute a command within docker swarm service

别来无恙 提交于 2019-11-27 05:27:52
问题 Initialize swarm mode: root@ip-172-31-44-207:/home/ubuntu# docker swarm init --advertise-addr 172.31.44.207 Swarm initialized: current node (4mj61oxcc8ulbwd7zedxnz6ce) is now a manager. To add a worker to this swarm, run the following command: Join the second node: docker swarm join \ --token SWMTKN-1-4xvddif3wf8tpzcg23tem3zlncth8460srbm7qtyx5qk3ton55-6g05kuek1jhs170d8fub83vs5 \ 172.31.44.207:2377 To add a manager to this swarm, run 'docker swarm join-token manager' and follow the