How find file in Docker?
This is my Dockerfile:
I’m having trouble with the
When I run
Here’s the code I’m using to read the file for seeding during migration:
In Docker, the issue seems to stem from the relative file path not being resolved correctly. I’d appreciate any help in resolving this so the app can find the file in the Docker environment.
I’m having trouble with the
programminglanguage.js file. This file contains master data, which my ASP.NET Core app uses during initialization to seed data into the database migration. Everything works fine in my development environment, but when I run the project in a Docker environment, the file can't be found.When I run
docker compose build, the service builds successfully. However, when the project runs in Docker, I encounter the following error:Here’s the code I’m using to read the file for seeding during migration:
In Docker, the issue seems to stem from the relative file path not being resolved correctly. I’d appreciate any help in resolving this so the app can find the file in the Docker environment.