fkie-cad / fact_extractor

Standalone Utility for FACT-like extraction
GNU General Public License v3.0
80 stars 31 forks source link

Make the Dockerfile more cache friendly #124

Open maringuu opened 8 months ago

maringuu commented 8 months ago

Currently the first thing we do is copy the whole directory in the docker image. So when changing anything the whole thing is rebuild from scratch.

A use case would be working on an unpacker. I don't want to wait 10 minutes just to text if it works. There are two solutions I'd propose.

Making the image more mount firendly

A workaround would be to mount the fact_extractor directory in the container when developing. This does not work for the following reasons.

Bin dir

Binaries are installed in the repo. Easy to change. I'd suggest /usr/local/bin.

venv

The venv is installed in the repo. Easy to change. I'd siggest /venv for the docker image.

Uncoupeling the installer

The installer is tightly coupled to the rest of the code. If we could execute it separately then we could execute the installer first (which takes most of the time) and then copy the rest of the directory. Of course if you change sth in the plugin installers the image would not work which is not ideal.