Lib installation in nvidia-docker

Can install lib in nvidia docker using apt-get. But after exiting the docker, the lib doesn’t exist anymore. How can I install permanently in the docker?