Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ch4d1 opened this issue Sep 1, 2023 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@ch4d1
Copy link

ch4d1 commented Sep 1, 2023

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 Dockerfile to 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.

@BastianGanze BastianGanze added the enhancement New feature or request label Oct 5, 2023
@BastianGanze BastianGanze self-assigned this Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants