volkszaehler / mbmd

ModBus Measurement Daemon - simple reading of data from ModBus meters and grid inverters
BSD 3-Clause "New" or "Revised" License
241 stars 85 forks source link

Update Dockerfile #323

Open isarrider opened 1 year ago

isarrider commented 1 year ago

Define target build dir as tmpfs (makes build a little faster) Be more specific by using FROM alpine:latest instead only FROM alpine

SchumacherFM commented 8 months ago

Can this be please merged to speed up docker build @andig ?

andig commented 8 months ago

Does this have any measurable effect? Does layer csching still work?

SchumacherFM commented 8 months ago

$ time docker buildx build --platform linux/arm64 -t ghcr.io/xxxxxxxxxx/mbmd:latest . This PR

real    11m48.745s
user    0m2.571s
sys 0m2.225s

Without these changes:

real    10m55.284s
user    0m2.364s
sys 0m1.871s

OMG 🤣 - IMHO you can close this PR without merging. Sorry for bothering you.

isarrider commented 8 months ago

I cant remember the time difference but did you bench on sth with a very slow storage like a SD-Card?

SchumacherFM commented 8 months ago

MacBook Pro 13-inch, 2017 with Docker Desktop

isarrider commented 8 months ago

Well - when there is a fast SSD in -> of course no advantage (besides not abusing the SSD Write cycles) I use it on my Rock 5 with a slow SD Card...