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

Dockerfile: remove node runtime #283

Open
wants to merge 8 commits into
base: dev3
Choose a base branch
from

Conversation

willholley
Copy link

Why:

The websites served under WebDashboard and
givtcp-vuejs are status - there's no need to have
nodejs at runtime. Removing nodejs / npm and the
build-time dependencies shaves around 500MB from
the docker image (as well as reducing the CVE
surface).

How:

  • Adds a builder stage which compiles givtcp-vuejs. The resultant static files are copied into the final image.
  • Removes npm and http-server from the runtime image.
  • Adds exclusions to .dockerignore for some of the Webdashboard files that have no runtime purpose.
  • Updates startup.py to write out nginx configuration that serves WebDashboard as a static site. This is only really needed because the dashboard port is configurable/toggleable - else we could just define this in the standard ingress.conf.

britkat1980 and others added 7 commits October 1, 2024 09:52
Why:

The websites served under WebDashboard and
givtcp-vuejs are status - there's no need to have
nodejs at runtime. Removing nodejs / npm and the
build-time dependencies shaves around 500MB from
the docker image (as well as reducing the CVE
surface).

How:

 * Adds a builder stage which compiles givtcp-vuejs.
   The resultant static files are copied into the
   final image.
 * Removes npm and http-server from the runtime image.
 * Adds exclusions to .dockerignore for some of the
   Webdashboard files that have no runtime purpose.
 * Updates startup.py to write out nginx configuration
   that serves WebDashboard as a static site.
   This is only really needed because the dashboard port
   is configurable/toggleable - else we could just
   define this in the standard ingress.conf.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants