Why is `libz.so.1` missing in my Docker container even though it's installed on the host machine?

Question

Grade: Education Subject: Support
Why is `libz.so.1` missing in my Docker container even though it's installed on the host machine?
Asked by:
97 Viewed 97 Answers

Answer (97)

Best Answer
(283)
Docker containers are isolated environments. What's installed on your host machine doesn't automatically exist within the container. Each container has its own filesystem, so you need to explicitly install zlib inside the Dockerfile while building the image that the container uses.