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

Fix Dockerfile to use locked dependencies #172

Merged
merged 1 commit into from
Feb 10, 2024

Conversation

Tomtec331
Copy link
Collaborator

This fixes #171

The Dockerfile now copies package.json and package-lock.json too. Instead of installing the dependencies in each sub-project (e.g. frontend and backend) it now uses the workspaces defined in the main package.json to handle this (only one install call). For reproducible builds "clean-install" is now used as this operation never modifies the lock file (in contrast to the regular install command).

The .dockerignore now includes all unnecessary folders that should not be copied to the image.

Now the dockerfile will copy the package.json and package-lock.json. Additionally npm clean-install instead of install will be called in the root folder. This downloads all dependencies without possibly modifying the lock file.
@Tomtec331 Tomtec331 linked an issue Feb 9, 2024 that may be closed by this pull request
@srieger1 srieger1 merged commit f631e58 into master Feb 10, 2024
3 checks passed
@srieger1 srieger1 deleted the 171-package-lock-dockerfile branch February 10, 2024 12:35
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.

Package-lock not used in Dockerfile
2 participants