If you are new to Docker and trying MagicMirror with the Docker container, you might be wondering how you can send and retrieve files from a Docker container, so that you can use the MagicMirror Docker container on your own contracts, and save the outputs in locations you want.
For that, we use the -v mounting volume option when we start the MagicMirror Docker container. Assume you have a folder ./myfolder/ on your own system with the following layout.
Let's say you want the container to be able to read the contract files in ./myfolder/contracts/ and outputs the result in ./myfolder/result/. You can execute the following command to launch the container with ./myfolder/ mounted to /home/mount/ in the container.
*Note, /home/ is where the magic_mirror executable is at.
docker run -it -w /home -v ./myfolder:/home/mount magicmirrorfuzzing/magic_mirror
Once you execute the above command, you will find that the /home/mount/ directory is created in the Docker container, and both your system and container can read and write into the directory.
Next, you can execute the following command in the container to fuzz a.solwith the --output_dir option in magic_mirror, so the outputs from MagicMirror will be saved in the result folder of your own.