I was wondering if there is an existing tool that can automatically redirect the download of a file to a container ? Or if there is an existing open-source project about it.

For more context, I wanted to know more about the possibility to protect a system from a malware by creating or opening a container, then open or execute the file in it, each time I try to download a suspicious file from the web. Then take differents actions depending on if it's a safe file or not (transfer it from the container to the local system or delete the container)

So if it hasn't been done I would like to understand why. Maybe it's counterproductive or maybe better tools already exists.

Thanks in advance for the response. I hope I have been clear, English isn't my first language.

I haven't try it yet, just want more informations about the idea.

1

There are 1 best solutions below

1
On

You can run a container in interactive mode, and that will provide a sort of sandbox environment for you. However, make sure you don't mount any volumes into the container.

For example, if you have a container named container, you can run:

docker run -it container

and it will run the container in interactive mode, entering at the entry point specified in the docker build file. You should then be able to mess around and not have to worry about malware, and do some sleuthing.