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.

  • Docker pull repositoryName don't work can't see public repos
  • Should I add the reverse proxy in the same container as the application on docker?
  • At what point are Docker Variables available?
  • Add restrictions on docker command
  • How do I send app logs to Elasticsearch from within a Dockerized Node app?
  • Having nosetests watch files from outside container and rerun tests inside container
  • SkyDNS does not work with Kubernetes 1.1.2
  • No nodes connecting to host in docker swarm
  • execute binary on linked container in docker
  • Want to ssh into a running docker container running inside CentOs Image
  • docker compose v3 mounting files
  • HTTP(S) Load Balancing for Kubernetes / Docker
  • 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.