Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This change removes unused features of the Dashboard to reduce its overall size. I'm using the results of this run as the baseline for size comparisons.
Our total size right now is: 958.537 MB
For comparison, our control-plane services are in the range of ~40-80 MB each.
Of that ~450 MB comes from the base image and dependencies. In particular
yarn install
is adding ~405 MB of JS/static/native dependencies to the application.The features I'm targeting for trimming are the ones we don't actually use in the Dashboard:
Once we remove Scaffolding we can also remove Python from the base image.
Baseline
IMAGE CREATED CREATED BY SIZE COMMENT bc82f115b919 30 seconds ago CMD ["node" "packages/backend" "--config" "a… 0B buildkit.dockerfile.v0 <missing> 30 seconds ago RUN /bin/sh -c tar xzf bundle.tar.gz && rm b… 46.6MB buildkit.dockerfile.v0 <missing> 31 seconds ago COPY packages/backend/dist/bundle.tar.gz app… 11.8MB buildkit.dockerfile.v0 <missing> 31 seconds ago RUN /bin/sh -c YARN_CACHE_FOLDER=/home/node/… 405MB buildkit.dockerfile.v0 <missing> About a minute ago RUN /bin/sh -c tar xzf skeleton.tar.gz && rm… 4.12kB buildkit.dockerfile.v0 <missing> About a minute ago COPY .yarnrc.yml yarn.lock package.json pack… 1.25MB buildkit.dockerfile.v0 <missing> About a minute ago ENV NODE_ENV=production 0B buildkit.dockerfile.v0 <missing> About a minute ago WORKDIR /app 0B buildkit.dockerfile.v0 <missing> About a minute ago USER node 0B buildkit.dockerfile.v0 <missing> About a minute ago RUN /bin/sh -c apt-get update && apt-get… 3.45MB buildkit.dockerfile.v0 <missing> About a minute ago RUN /bin/sh -c apt-get update && apt-get… 333MB buildkit.dockerfile.v0 <missing> About a minute ago RUN /bin/sh -c corepack enable && yarn -v # … 7.53MB buildkit.dockerfile.v0 <missing> 5 days ago /bin/sh -c #(nop) CMD ["node"] 0B <missing> 5 days ago /bin/sh -c #(nop) ENTRYPOINT ["docker-entry… 0B <missing> 5 days ago /bin/sh -c #(nop) COPY file:4d192565a7220e13… 388B <missing> 5 days ago /bin/sh -c set -ex && savedAptMark="$(apt-… 9.36MB <missing> 5 days ago /bin/sh -c #(nop) ENV YARN_VERSION=1.22.19 0B <missing> 5 days ago /bin/sh -c ARCH= OPENSSL_ARCH= && dpkgArch="… 112MB <missing> 5 days ago /bin/sh -c #(nop) ENV NODE_VERSION=18.19.0 0B <missing> 5 days ago /bin/sh -c groupadd --gid 1000 node && use… 8.9kB <missing> 5 days ago /bin/sh -c #(nop) CMD ["bash"] 0B <missing> 5 days ago /bin/sh -c #(nop) ADD file:9deb26e1dbc258df4… 74.8MB