Mount data volume, then create symbolic link at container creation in docker

When docker-compose creates the container, is it possible to create a symbolic link from volume-mounted directory to another location in container?

I know it can be done in the Dockerfile, but I wont have the data volume mounted at the moment of building the image.

  • How to avoid undesired “animated” console output on Jenkins
  • war-file as a part of container or shared folder when running docker
  • Run multiple servers from a docker image
  • Run python website on docker
  • Kubernetes plugin containers can't connect back to Jenkins
  • postgres does not start. (involves Django and Docker)
  • Can't pull the splash image from docker
  • Unsatisfiable constraints when installing packages on docker alpine
  • Executing in python Docker container
  • MYSQL installation errors with docker
  • Run command on multiple Docker containers at once
  • Docker compose wordpress plugins
  • One Solution collect form web for “Mount data volume, then create symbolic link at container creation in docker”

    You can create a symbolic link to a file or directory that doesn’t exist. And you can also mount a volume over top of an existing file/directory and the symbolic link will point to the newly mounted contents. So add the link inside your Dockerfile to the image.

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