This pull request addresses the issue found in the frontend Dockerfile where the command npm run local was specified. Since there is no local script in package.json, this command would cause the Docker container to fail to start. I have updated the Dockerfile to execute the dev script instead, which aligns with the existing scripts defined in package.json and ensures that the Docker container for the frontend can start and run without issues.
Related Issues
Fixes #985 - Missing script local in frontend when running with Docker
Steps to Test
Pull down the branch associated with this pull request.
Navigate to the root directory of the project.
Run docker-compose build to rebuild the frontend service with the updated Dockerfile.
Start the services using docker-compose up.
Open a web browser and navigate to http://localhost:3000 to ensure that the frontend service is running and accessible.
Screenshots (if applicable)
N/A (The change is in the configuration file and does not affect the visual aspect of the application.)
Checklist
[x] I have tested these changes by rebuilding the Docker container and confirming that the frontend service starts as expected.
[x] I have updated the relevant documentation (the Dockerfile) with the correct npm command.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] I have made corresponding changes to the codebase (updated the Dockerfile CMD instruction).
[x] My changes generate no new warnings or errors.
[x] The title of my pull request is clear and descriptive (Fix incorrect npm script in Dockerfile for frontend).
Description
This pull request addresses the issue found in the frontend Dockerfile where the command
npm run local
was specified. Since there is nolocal
script inpackage.json
, this command would cause the Docker container to fail to start. I have updated the Dockerfile to execute thedev
script instead, which aligns with the existing scripts defined inpackage.json
and ensures that the Docker container for the frontend can start and run without issues.Related Issues
Steps to Test
docker-compose build
to rebuild the frontend service with the updated Dockerfile.docker-compose up
.http://localhost:3000
to ensure that the frontend service is running and accessible.Screenshots (if applicable)
N/A (The change is in the configuration file and does not affect the visual aspect of the application.)
Checklist
npm
command.CMD
instruction).Fix incorrect npm script in Dockerfile for frontend
).