'docker-like' bind mounts (without docker)
by masavini from LinuxQuestions.org on (#5B2SX)
hi,
I'm actually using docker with nested bind mounts to run 2 instances of the same application with different configurations.
let's say i have an app running on the host and reading it's configuration from the directory /home/user/.config/app_config.
i can run a second instance with a different configuration running this docker command:
docker run -it \
-u user \
-v /home/user:/home/user \
-v /home/user/.config/alternative_app_config:/home/user/.config/app_config \
app_image
with this command the application running into the container reads its configuration from the host /home/user/.config/alternative_app_config directory, leaving the other configuration dir untouched.
is there a way to get this kind of behaviour without docker?
thanks!


I'm actually using docker with nested bind mounts to run 2 instances of the same application with different configurations.
let's say i have an app running on the host and reading it's configuration from the directory /home/user/.config/app_config.
i can run a second instance with a different configuration running this docker command:
docker run -it \
-u user \
-v /home/user:/home/user \
-v /home/user/.config/alternative_app_config:/home/user/.config/app_config \
app_image
with this command the application running into the container reads its configuration from the host /home/user/.config/alternative_app_config directory, leaving the other configuration dir untouched.
is there a way to get this kind of behaviour without docker?
thanks!