Can't attach volume to docker with jenkins through fig

I try setup sonarqube and jenkins through one fig config. But can’t attach volume to docker with jenkins through. Can somebody help?

In this way container run correctly:

  • What's the best practice for including a .env file in a jenkins build?
  • Best practice re running bash for attaching to Docker running instance
  • external access to kubernetes
  • docker - local DNS
  • docker exec VS docker --rm -d --rm --volumes-from
  • change bluemix docker default subnet to a different value?
  • docker run -p 8080:8080 -v /opt/jenkins_home:/var/jenkins_home shami13fastpool/fastpool-jenkins
    

    fig.yml:

    postgresql:
      image: orchardup/postgresql:latest
      environment:
        - POSTGRESQL_USER=sonar
        - POSTGRESQL_PASS=sonar
        - POSTGRESQL_DB=sonar
      volumes:
        - /opt/db/sonarqube/:/var/lib/postgresql
      ports:
        - "5432:5432"
    sonarqube:
      image: harbur/sonarqube:latest
      links:
        - postgresql:db
      environment:
        - DB_USER=sonar
        - DB_PASS=sonar
        - DB_NAME=sonar
      ports:
        - "9000:9000"
        - "443"
    jenkins:
      image: shami13fastpool/fastpool-jenkins:latest
      volumes:
        - /opt/jenkins_home/:/var/jenkins_home/:rw
      links:
        - postgresql:db
        - sonarqube:sonarqube
     ports:
        - "8080:8080"
    

    This both commands must run the same instance of jenkins, but i’ve got different instances

  • docker compose- how to set name property
  • Fabric Composer quick-start failing when trying to deploy the bna file on OSX
  • Mounting a host directory through docker-compose file version “3” and re-using the data-volume
  • How to test queue worker outage and recovery
  • How can a few small Python scripts be run periodically with Docker?
  • What docker image use for ionic CD / e2e testing? Ubuntu or just node?
  • One Solution collect form web for “Can't attach volume to docker with jenkins through fig”

    In your fig.yml file, you’re linking to postgres and sonarqube, but you’re not doing any linking in your Docker command.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.