dertinfo / dertinfo-app

An Azure Static Web App wrapping an Angular client for capturing scores and score sheet images. It also feeds back results and sheets to groups and group members
https://app.dertinfo.co.uk
GNU General Public License v3.0
0 stars 0 forks source link

[BUG] Running the command docker run dertinfo/dertinfo-app doesn't do the file replacements #25

Closed davidsmonkeys closed 2 months ago

davidsmonkeys commented 2 months ago

Describe the bug

In the readme for the app we state that we can run the app using local code locally in docker. Why we would do this I do not know. However it should be possible and we should make it possible as we have made these configuration changes to allow it to run in codespaces and as a result we've stopped it working locally.

It's not likely to be a common usage scenario but it should work

To Reproduce Steps to reproduce the behavior:

  1. Go to dartinfo/dertinfo-app repo locally
  2. Build the image using the command "docker build -t dertinfo/dertinfo-app . "
  3. Run the built image using command "docker run dertinfo/dertinfo-app"
  4. Witness the docker run error when attempting to do the file replacements in the docker-launch.sh script

Expected behavior It shouldn't error and it should handle the absence of the files more gracefully in this secenario

Screenshots image

Desktop (please complete the following information):

Smartphone (please complete the following information): N/A

Additional context

davidsmonkeys commented 2 months ago

This bug is caused by the file being saved with CRLF line endings. When you switch that to LF only hen it all works as expected. The file is bundled into the image correctly and when run from the container performs as expected.