Use of temporary file in a docker container .NET 6

andrea92

New member
Joined
Jul 6, 2023
Messages
1
Programming Experience
1-3
Hi all, i've a container running code in .NET 6, dockerized and running on Azure k8s. Inside this container, i handle a message from a topic of a Service Bus. It should manage aroung 20k messages a day.

Scenario description:
I have to call an .exe (size around 100 MB) that take in input a file and generate a response in a given physical subfolder on disk. The response include two files, that i upload then to a blob storage. Finally i delete these temporary files on disk. The execution of the .exe will be of 1 minute.

Question:
Where should i store the exe? Its content will change 2-3 times a year (so few times). I was thinking to include it in the docker image, for example in "\app\resources" and then call it creating a random temp folder in the same path, one for each execution. In alternative i was thinking to Azure File Share (but i'm concerned about the traffic cost). The data is temporary, so if the pod goes down, i don't care about them.

I've already read about volumes in Docker, but i don't find any question/topic that fit my problem, so i'm searching for some advices.

Thanks
 
Sounds like Docker configuration question rather than a C# question.

Try reading about how scripts and other "loose" files are staged in a Docker image. Your .exe is just another "loose" file.

It's unclear to me why you need to create a random temp folder for each execution, but you know your problem domain better and didn't explain why this is necessary.
 

Latest posts

Back
Top Bottom