call a script file from one docker container to another container using –link container

I have created a container with a name of “tensorflowsyntaxnet_container” using docker command docker run -d -name tensorflow_syntaxnet_container syntaxnet_image and the other container “python_flask” with linking the tensorflow-syntaxnet_container using docker command docker run -d -p --link tensorflow-syntaxnet_container:syntaxnet -name python_flask python_image:latest and both the containers are create successfully and its working as expected individually.

Also verified that python_flask container lined with syntaxnet container as cat /etc/hosts results syntaxnet e002ab9f43a7 tensorflow-syntaxnet_container which is container ip of syntaxnet container.

  • Accessing tag as an environment variable inside a Docker container
  • Network connection between 2 Docker Container (JBOSS/DATABASE)
  • Docker container name not resolved as DNS for overlay network not reachable
  • Chaining Docker Images and execute in order
  • Building a docker image doesnt stop because of minecraft server continuing to run
  • How to send to stdin of a docker-py container?
  • i need call a script file and need to access output file in connect with tensorflow-syntaxnet_container from my python flask application located at python_flask container

    i could not find any mount directory or folder of linked container tensorflow-syntaxnet_container

    Could any one can help me out how to call the script file and access all file from one container to another

  • Change hostname after running a container
  • creating jhipster-spring boot project war file error
  • Cannot get image on Docker - Network timed out [Windows]
  • AWS ECS running a task that requires many cores
  • Node.js modules not building in Docker
  • How to get the service IP in Kubernetes?
  • 2 Solutions collect form web for “call a script file from one docker container to another container using –link container”

    Check it here Docker Link Docks
    and here Docker Volume Docs

    With --link you only can link network interfaces of container. If you want to share filesystem, you will, probably, need --volumes-from.

    docker create -v /path/to/script/dir --name scriptstore image1:name
    docker run -d --volumes-from scriptstore --name runner image2:name bash /path/to/script/dir/

    Linking two containers enables network communication. What you want are volumes:

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