dockerethereumkunstmaan

Docker using separate lib/bin


I'm new to Docker and as I understand, Docker uses the same libs/bins for multiple containers where possible. How can I tell Docker to don't do that - so using a new lib or bin even if the same lib/bin already exists?

To be concrete: I use this image and I want to start multiple instances of geth-testnet but all of them shall use their own blockchain.


Solution

  • I don't believe you need to worry about this. Docker uses hashing of the layers under the image to maximize reuse. These layers are all read only, and mounted with the union fs under a container specific read-write layer. The result is very efficient on the filesystem and transparent to the user who sees them as writable in their isolated container. However, if you modify them in one container, the change will not be visible in any other container and will be lost when the container is removed and replaced with a new instance.