I have a tomee docker container on which I deployed an app, which runs on port 8080 , have exposed it using "docker run -p ". It can be accessed fine through the browser. However, this app requires the user to feed the data. For feeding the data, we need to specify the file location to be uploaded. When running on the server, the location is detected, file is loaded and job is run perfectly. While running on container, the app cannot find the file/location. I have tried bind-mount, volume mount and can access the mounted folder in the docker container manually from bash prompt. But app cannot find it. Directory/file permissions set to 777 but still. Stuck here.Could it be a time-zone issue? Docker is at UTC and host at EST.
Asked
Active
Viewed 68 times
1 Answers
0
Did you specify path location as relative or absolute to the application working directory? You can find more information on docker container configuration here if you want to review it.
If you can share the Dockerfile you’re using and your docker run commands we could get a better idea of what is happening.
When you test this inside the container does it work correctly?
It looks like this is not something to do with permissions but rather the path specification and whether that directory is configured correctly on the container application. Ensure the path location is absolute and verify the directory configuration and try your test again.

Mika Wolf
- 169
- 3
-
Thanks for the answer. Luckily I used the dockerfile to build a container on azure and it worked fine and detected the files correctly. I will try with a different instance on AWS and check the results. – Aditya Sharma Jan 15 '18 at 11:39