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.

  • Add xserver into Docker container (the host is headless)
  • Create keyspace automatically inside docker container with cassandra
  • Kubernetes authentication issues pulling ECR images
  • Unable to delete untagged images:Error response from daemon: Conflict, 511136 wasn't deleted FATA[0000] Error: failed to remove one or more images
  • customized Docker mongodb image gets stuck : can't stop, kill, open
  • Using remote byebug instance with docker-compose
  • 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

  • redirect the output of docker-exec
  • Docker container and docker container on VM
  • EF Core migrations using core, SQL Server and Docker yields dotnet SDK error
  • Redis in docker starts/restarts multiple times?
  • add ssh keys in Docker
  • Docker inside VirtualBox
  • 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.