Closed atati-cs closed 3 years ago
Hey @atati-cs, sorry for the long wait!
I've actually got a PR up to address part of this issue: #107. However, this solution will only work if your TmpDir
is unset, starts with /hauser
, or does not start with a slash (e.g. TmpDir = "tmp"
).
If you would like to save the tmp files to a different location, you can mount a folder as you demonstrated.
There is a bit of tension here since the docker container is supposed to be as lightweight as possible (essentially just a single binary), but the hauser process may require saving some fairly large files temporarily. I believe the default size of docker containers is 10GB, so if your export files are large enough, this could also be a problem when simply writing to the container disk. If you ever run into this issue, I would suggest either shortening the ExportDuration
in the config file, or mounting a directory from the host. Changing the duration is definitely the simplest method.
@camphillips22 thank you for your response and the clarification. I realize one additional change I have made in the config.toml file which may have been the reason for the permission denied error that I was getting. I've used the "/tmp" as the "TmpDir" with the additional slash ("/") in the front. Your comment about "does not start with a slash" above made me look at my configuration again. My issue is resolved now!
I've built a docker image (hauser:0.1) using the Docker file in the repository.
The two changes that I have in the Dockerfile are
When I do a docker run, as follows, I get a permission denied error
After some trial and error, I made an assumption that the TmpDir specified in the config.toml file may be referring to the host's directory instead of the container's directory. So, I created a "/tmp/hauser_data" directory on the host and tried the docker run with a mount volume as follows and it worked
I have a couple of questions based on this: