doprz / dipc

Convert your favorite images and wallpapers with your favorite color palettes/themes
Apache License 2.0
232 stars 7 forks source link

Add Docker to this project #20

Open kawaegle opened 1 year ago

kawaegle commented 1 year ago

this is a way to implement docker for your project.

doprz commented 1 year ago

Thank you for your first PR and my apologies for taking a while to respond.

Would it be possible to add layer caching to the PR for faster building?

Also what are your thoughts on using a different base such as:

My goal with these questions is to explore how we can create faster and more efficient Docker builds.

kawaegle commented 1 year ago

I'm currently learning docker and so i'll see what I can to lightweigth the images

kawaegle commented 1 year ago

Did you try to build the image ?

For me i get with thé actual version

user@machine: docker images 
dipc-test.   92.6Mb

And with rust:slim

user@machine: docker images 
dipc-slim.      86.1Mb

The major problem I get is when i use alpine or anything like this I get missing librairies for thé launchable docker

And if I compile with rust:alpine there is linking error.

Must i can save is using slim images.

Hope it help a little

doprz commented 1 year ago

Interesting. I will work on this and get back to you as soon as I can.

kawaegle commented 1 year ago

i'll finally found out to compile and have a workaround with alpine now: localhost/dipc latest bc8c90d9b0bc 5 minutes ago 16.4 MB much better but there is maybe a better way to split the built to optimize cargo build (maybe in release mode) I don't use rust that much

doprz commented 1 year ago

Great work! We can focus on performance improvements later on, for now the PR just needs minor adjustments before being merged.

kawaegle commented 1 year ago

I still learning and I appreciate that i was not judge by my first PR

if you need anything else let me know

doprz commented 1 year ago

Don't worry, we're here to learn and your PR is a great contribution to dipc. I will finish reviewing the PR this week. Great job and once again thank you!