docker-stack

Getting invalid mount config for type “bind”: bind source path does not exist in docker

孤人 提交于 2019-12-10 13:33:28
问题 I am trying to deploy following docker-compose into docker swarm cluster. version: '3.2' services: jenkins: image: jenkins/jenkins:lts ports: - 8080:8080 volumes: - ./data_jenkins:/var/jenkins_home deploy: mode: replicated replicas: 1 I do have the data_jenkins in the same locations where docker-compose is and passing that path as volume . But why is it throwing the source path does not exist. What exactly is the problem. Also if the directory doesnot exist -v should have created it right.

docker stack deploy results in “No such image error”

妖精的绣舞 提交于 2019-12-09 14:50:17
问题 I am using docker swarm and would like to deploy a service with docker-compose . My service uses a custom image called myuser/myrepo:mytag that I successfully deploy to Docker-Hub to a private repository. My docker-compose looks like this: version: "3.3" services: myservice: image: myuser/myrepo:mytag ports: - "8080:8080" Before executing, I successfully pulled the image with: docker pull myuser/myrepo:mytag When I run docker stack deploy -c docker-compose.yml myapp I always receive the error

How to stop a deployed docker stack?

孤者浪人 提交于 2019-12-04 17:23:27
问题 I just completed the beginners Docker tutorials and would like to know how to clean up. I deployed a stack and with a few different service using the below command: docker stack deploy --compose-file docker-stack.yml vote Is there away to stop all the containers associated with this stack, or do I have to stop them individually? Thank you! 回答1: You can remove a stack with: docker stack rm vote At present, this is still a detached operation that will take time to run in the background. If for

Docker socket crash after stack up

依然范特西╮ 提交于 2019-12-04 10:18:00
I trying to deploy docker stack, that includes my development environment. But in random cases I have next error: > failed to create service < service_name >: Cannot connect to the > Docker daemon at unix:///var/run/docker.sock. Is the docker daemon > running? Next I restart docker daemon. Sometimes it requires to kill docker processes and shims. I deleting old stack and build again. Some times docker successfully finishes build, but socket crashes on the starting stage. Also all containers work properly when I starting it in regular mode, without swarm or stack. It is not work exactly inside

Docker stack deploy in windows

女生的网名这么多〃 提交于 2019-12-02 16:53:00
问题 i have some questions in docker stack windows. Can we enable docker stack in windows 2016. Is it fully supported. if yes, how can we enable. how we can automate creating swarm cluster using this file. i have searched google but can't find related to windows. please provide me If you have any links to study. 回答1: Docker stack is somehow the equivalent for docker-compose but in swarm. A stack is a composition of multiple services defined in a stack file. You deploy a stack on a docker swarm

Where to put the php artisan migrate command

北慕城南 提交于 2019-11-28 09:22:10
Trying to deploy the laravel application on docker stack .What I am confused or not able to figure out is where can I run this php artisan migrate:fresh to generate the tables required in mysql. The services and the task are running well docker-compose.yml version: '3.3' networks: smstake: ipam: config: - subnet: 10.0.10.0/24 services: db: image: mysql:5.7 networks: - smstake ports: - "3306:3306" volumes: - db_data:/var/lib/mysql environment: MYSQL_ROOT_PASSWORD: password MYSQL_DATABASE: smstake MYSQL_USER: root MYSQL_PASSWORD: password deploy: mode: replicated placement: constraints: - node