Rocker and Private Package Not Persistent

I'm using Rocker in a Docker container and one of the packages that I use is a private one that I wrote. The problem is that every time I restart the container, I have to create the package again using devtools and document. This doesn't happen when I run my program under Linux or MacOS.

Any suggestions on how to make my private library persistent in a docker container?

Hi @EWeiss,

Sounds like you're saving the state inside the container. Anything inside a docker container is ephemeral and only lasts through the duration of the container session. Sounds like you want to save your package on a volume that's mounted in from outside the container.

I'm working on a book on DevOps for Data Science. This section might be useful to you -- please let me know!

https://do4ds.com/chapters/sec1/docker.html#understanding-docker-run

Thanks, this helped me to solve my problem. What I also needed to do is to use .libPaths() to set a directory that mount as the default library. This also means that things like recently used files work.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.