BaldissaraMatheus / Tasks.md

A self-hosted, Markdown file based task management board
https://hub.docker.com/r/baldissaramatheus/tasks.md
MIT License
737 stars 30 forks source link

Feature: Use multi-stage building for Docker image #6

Closed stumpylog closed 1 year ago

stumpylog commented 1 year ago

This PR updates the Dockerfile to use a multi-stage build process. This allows the separation of the npm building from the actual serving of the files. This saves about 50MB of image size and everything seems to work as expected still.

I'm not expert on Node related things, so while I tested the resulting image locally, I might have missed something still.

REPOSITORY                            TAG                IMAGE ID       CREATED          SIZE
tasks.md                              local              1c958e83952d   5 minutes ago    100MB
baldissaramatheus/tasks.md            latest             69016cd97789   29 hours ago     151MB