How can I make connection between two services in docker swam?

How could I make connection between 2 services: MySQL & OCS in docker swarm the 2 services are in the same overlay network.

  • Is there a way to build docker image from two jars such as each jar locates in it's own layer
  • How to fix output from tty of Docker for macOS vm?
  • Run a shell command inside a running Docker container using Ansible
  • How to list the published container images in the Google Container Registry using gcloud or another CLI
  • Unable to connect to SQL Server Linux Docker container via SQL Server Management Studio
  • How to push into gitlab again when the docker-volume or the server data is recreated?
  • How to execute bash script in docker container before docker will run CMD?
  • Error when loading a docker imager
  • Sending sigstop and sigcont to docker containers
  • Docker containers work on port 80 only
  • Docker - Execute a bash when running a container
  • Installing Pillow requirements on debian Jessie
  • One Solution collect form web for “How can I make connection between two services in docker swam?”

    Just reference the other service by it’s service name with DNS. It should resolve.

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