prona-p4-learning-platform / learn-sdn-hub

12 stars 6 forks source link

Fix Dockerfile to use locked dependencies #172

Closed Tomtec331 closed 7 months ago

Tomtec331 commented 7 months ago

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.