How does the use of dynamic libraries (shared objects) work in a container?

Hello, I’m starting studies with container.

I would like to understand how the use of dynamic libraries (shared objects) of the docker works. When the container runs an Ubuntu image equivalent to the host machine’s version, will it use the same libraries? Is there any way to capture the libraries used by a specific container?

No, for LXC or Docker, everything inside the container is not shared with the host by default. That’s one of the objective of containers to separate things. This separation for files (i.e shared libs) is done at filesystem level using mount namespace to hide the host filesystem hierarchy from applications inside the container.

Here is a technical conference from @stgraber and @brauner to understand how everything works for containers (applicable for LXC or Docker for most parts) :

Thank you very much for your reply. Is it possible to get information about runtime dependencies of applications running inside a container through external code? . For example, I would have a kernel module on the host that would be able to get the file path of applications and their dependencies at runtime. It is possible?