Docker Community Forums

Share and learn in the Docker community.

Error : Duplicate mount point -- only in docker swarm


#1

I am running in strange problems and i am new to docker.
I have created docker -compose.yml with 3 services gitlab, nexus and jenkins. I have specified all deploy attributes, volumes in to it. When i execute it using docker-compose up it executes without any issue but when i use
docker stack deploy -c docker-compose.yml mystack i get error duplicate mount point for gitlab. rest of the services starts without any issues
Cause of this error:
I have done some R&D and what i found was gitlab has 3 different mount points 1. logs 2. data 3. configs When i specify this 3 mount points it gives me the error mentioned above. But when i specify only 1 mount point then it doesnt gives error.
Can any 1 solve my issue ? cos its be 2 days i am stuck with it and now i am runing out of ideas.
docker-compose n env file can be found here
for essence of time let me add i have tried by creating all the volumes totally in separate directories still i have same issue. I tried creating service with same configuration as stated in docker compose and i was able to create it … I have 3 nodes (workers)and 1 swarm node which is leader

configuration : docker for windows
docker-compose version 1.23.2, build 1110ad01
docker-machine.exe version 0.16.1, build cce350d7
docker-engine community Version: 18.09.1
docker-compose.yml

version: “3.6”
networks:
development-network:
driver: overlay

services:
gitlab:
env_file:
- .env
image: gitlab/gitlab-ce
hostname: "{SYSTEM_ENV}.gitlab.com" networks: - development-network ports: - "9090:80" - "5658:22" - "44301:4430" volumes: - type: bind source: /var/opt/gitlab target: {GITLAB_DATA}

    - type: bind 
      source: /var/log/gitlab
      target: "${GITLAB_LOGS}"         
      
    - type: bind
      source: "/etc/gitlab"
      target: "${GITLAB_CONFIG}"

deploy:
replicas: 1
restart_policy:
condition: on-failure
max_attempts: 3

nexus:
image: sonatype/nexus3
env_file:
- .env
hostname: "{SYSTEM_ENV}.nexus.com" ports: - "8081:8081" - "8123:8123" networks: - development-network volumes: - type: bind source: /nexus-data target: {NEXUS_DATA}

jenkins:
image: jenkins:alpine
env_file:
- .env
hostname: "{SYSTEM_ENV}.jenkins.com" ports: - "8080:8080" volumes: - type: bind source: /var/jenkins_home target: {JENKINS_DATA}

env file
SYSTEM_ENV=dev
ROOT_PASSWORD=password
GITLAB_PORT_WEB=9090
GITLAB_PORT_SSH=44301
GITLAB_PORT_STANDARD=5658
GITLAB_DATA=/d/tmp/git/data
GITLAB_LOGS=/c/Users/gitlab_logs
GITLAB_CONFIG=/c/Users/Volumes/git/config
JENKINS_DATA=/c/Users/Volumes/jenkins
JENKINS_PORT_WEB=8080
NEXUS_PORT_WEB=8081
NEXUS_PORT_DOCKER_REPO=8123
NEXUS_DATA=/c/Users/Volumes/nexus/data
COMPOSE_CONVERT_WINDOWS_PATHS=1