-
Notifications
You must be signed in to change notification settings - Fork 21
add Dockerfile to containerize peepdb #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Hello @bobo333, thanks a lot for the effort you put to write this detailed comment. We also wanted to containerize the peepdb as it would be more plug n play, so yes we could proceed with that feature. I have some comments from my side: 1) The ~/.peepdb/ directory will have to be volume mounted into the container to not lose saved connections across containers, but that's more of a user preference, rather than part of building the docker image itself. I have a docker-compose file and setup that I was testing with if that would be helpful to include.
2) I tried to keep the image as small as I could, but some of the python packages, as well as the libmariadb3 libmariadb-dev requirements add a good amount of size (~300MB).
3) One of the alpine images could possibly be used if there's a strong desire to make the image smaller, but considering the installed packages themselves account for most of the space, I'm not sure how beneficial that would be. It also uses apk instead of apt and I didn't look into how the mariadb dependencies map to that package manager.
|
include information about creating a volume for persisting connection data across containers
|
Hi @Aherontas thanks for taking the time to review. I'll go in order of your comments
2 and 3. The way the package is built right now, That being said, even if it was only included as part of the Ultimately up to you, my personal recommendation is containerize it as is (despite the large size) and then create a separate issue to work on reducing the size of the image by making |
| peepDB is also available as a `docker` image | ||
|
|
||
| ``` | ||
| docker pull [docker repo]/peepdb:0.1.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Aherontas I'm not sure what docker repo you plan to use, I can update this accordingly if you let me know what it should be
|
Thank you @bobo333 for the detailed answer, I tottally agree with the following: Ultimately up to you, my personal recommendation is containerize it as is (despite the large size) and then create a separate issue to work on reducing the size of the image by making mariadb an optional/extras part of the install. (Or ideally find a way to support mariadb without requiring those extra libraries to be on the host, it seems kind of odd that even client code requires all the binaries, but I am not a mariadb expert so maybe there's a reason) We may have to also rethink the way DB dependencies are handled. Probably we could do what you said, making a big container in size for now and think if MariaDB could be removed or be handled in another more efficient way. Let's wait also for @evangelosmeklis opinion on this. |
Happy to make adjustments if requested. I only pinned the version of
peepdbitself, as the installation instructions don't mention specific versions of other dependencies.Also happy to add docs for building if desired. I built this with
docker build . -t peepdb:0.1.4. To specify a different version ofpeepdbit can be done asdocker build --build-arg version=0.1.3 . -t peepdb:0.1.3I did some testing with
docker-composeand afaict it worksThe
~/.peepdb/directory will have to be volume mounted into the container to not lose saved connections across containers, but that's more of a user preference, rather than part of building the docker image itself. I have adocker-composefile and setup that I was testing with if that would be helpful to include.I tried to keep the image as small as I could, but some of the python packages, as well as the
libmariadb3 libmariadb-devrequirements add a good amount of size (~300MB).One of the
alpineimages could possibly be used if there's a strong desire to make the image smaller, but considering the installed packages themselves account for most of the space, I'm not sure how beneficial that would be. It also usesapkinstead ofaptand I didn't look into how themariadbdependencies map to that package manager.Thanks!
resolves #48