BastianGanze / weebsync

MIT License
2 stars 1 forks source link

Switch to node:18-alpine Base Image for Docker to Reduce Image Size #12

Open ch4d1 opened 1 year ago

ch4d1 commented 1 year ago

Issue: Currently, the Dockerfile uses a base image that leads to a significantly large Docker image. Switching to a lighter base image like node:18-alpine can help reduce the image size substantially without sacrificing functionality.

Suggestion: I recommend updating the Dockerfileto use node:18-alpine as the base image. This image is much smaller in size and should still support all the functionalities we currently have, since your Dockerfile is quite straightforward and doesn't use any commands specific to the larger standard Node image.

Benefits:

  1. Faster build and deployment times.
  2. Reduced storage costs.
  3. Smoother scaling operations.

Proposed Changes: Update line two in the Dockerfile to:

FROM node:18-alpine as build

Update line 9 to:

FROM node:18-alpine as run

Please consider this change for the upcoming releases.