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

Use Amazon Linux 2023 & production dependencies only #616

Merged
merged 4 commits into from
Sep 17, 2024

Conversation

kmcginnes
Copy link
Collaborator

@kmcginnes kmcginnes commented Sep 16, 2024

Description

The main goal of this change was to reduce or eliminate security vulnerabilities in the Docker image.

  • Update base image to use amazonlinux:2023
  • Move vite-tsconfig-paths to devDependencies where it should be
  • Update Dockerfile to cleanup any devDepencies
    • This required first removing the node_modules folders for all packages in the monorepo, then reinstall only the production dependencies, skipping scripts since husky is no longer installed and would fail

Validation

  • Local docker build and run to ensure functionality
  • Checked vulnerabilities in Docker image

CleanShot 2024-09-16 at 15 49 24@2x

Related Issues

Check List

  • I confirm that my contribution is made under the terms of the Apache 2.0
    license.
  • I have run pnpm checks to ensure code compiles and meets standards.
  • I have run pnpm test to check if all tests are passing.
  • I have covered new added functionality with unit tests if necessary.
  • I have added an entry in the Changelog.md.

@kmcginnes kmcginnes marked this pull request as ready for review September 16, 2024 20:53
Copy link
Member

@michaelnchin michaelnchin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kmcginnes can you confirm if there is any significant size differential between the new AL2023 image and the current AL2022 image?

@kmcginnes
Copy link
Collaborator Author

kmcginnes commented Sep 17, 2024

@michaelnchin yes, it does seem to be about 110 MB larger. Is that something I need to address?

OLD: 774.06 MB
NEW: 883.01 MB

@michaelnchin
Copy link
Member

Thanks @kmcginnes - I had some concerns around increased pull duration, but that size seems fine. On the registry side, the difference is closer to 1/3 that with applied compression.

@kmcginnes kmcginnes merged commit c6c03eb into aws:main Sep 17, 2024
1 check passed
@kmcginnes kmcginnes deleted the docker-image-latest branch September 17, 2024 16:47
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.

Resolve security advisories in Docker image
2 participants