stephenh / mirror

A tool for real-time, two-way sync for remote (e.g. desktop/laptop) development
Apache License 2.0
391 stars 35 forks source link

Use multi-stage Docker build and compile local code #17

Closed njam closed 6 years ago

njam commented 6 years ago

For #15

Using a Docker multi-stage build helps reducing the image size quite a bit. The build dependencies are only installed in the first image ("mirror-builder"), and the artifacts are then copied over into a final image ("mirror").

$ docker image list --format '{{.Repository}}\t{{.Size}}' | grep mirror
mirror  321MB
mirror-builder  970MB