aws / graph-explorer

React-based web application that enables users to visualize both property graph and RDF data and explore connections between data without having to write graph queries.
https://github.com/aws/graph-explorer
Apache License 2.0
317 stars 47 forks source link

[Feature Request] Reduce Docker image size #329

Closed kmcginnes closed 2 weeks ago

kmcginnes commented 5 months ago

Description

We should find ways to reduce the Docker image size if possible.

Additional Context

The Docker image size increased when we updated Node to v20.12.2.

The majority of the size is both Node itself and all the tools required to download and install Node.

There are base images that already include Node and are optimized for file size. I've tested node:20.12.2-alpine which seems to work and is very small and quick to build.

Example Docker Image Builds

Alpine Node Image - Node v20

Amazon Linux 2022 Image - Node v20

Amazon Linux 2023 Image - Node v20

Amazon Linux 2022 Image - Node v16

Related Issues

Relates to issue #307.

Tasks


[!IMPORTANT] If you are interested in working on this issue or have submitted a pull request, please leave a comment.

[!TIP] Please use a 👍 reaction to provide a +1/vote.

This helps the community and maintainers prioritize this request.

kmcginnes commented 5 months ago

Could impact issue #132

kmcginnes commented 5 months ago

The YouTube video below mentioned a tool in Docker called "scout" that has a compare function that can compare the vulnerabilities between two Docker images.

We can use this to compare the AWS linux image to the Alpine image to see if there are any regressions in vulnerabilities.

We can also use the docker init command to see if we can use any of the Docker best practices in the template file in our own Dockerfile.