# Docker Container

Instructions to download and install Docker can be found [here](https://docs.docker.com/engine/install/).&#x20;

## Pulling Docker image

```
docker pull magicmirrorfuzzing/magic_mirror
```

## Starting Container

```
docker run -it -w /home magicmirrorfuzzing/magic_mirror
```

`-it` option starts the docker container in an interactive process (like a shell). `-w` specifies the working directory when the container is first launched. `/home` is where the MagicMirror executable and a folder `/home/sample_contracts` of 15 sample contracts for users to play with. &#x20;

\*Note, the container can also be started with a folder mounted to your local system with the `-v` option, so you can load your own contracts and save the outputs from outside of the container, which we will discuss more in detail [here](https://magic-mirror.gitbook.io/magicmi/running-magicmirror/more-docker-tricks#mounting-external-folder).&#x20;

\*Note, you can also combine the work of starting the container with a mounted folder and executing your contract into a one-line command, which we will discuss more in detail [here](https://magic-mirror.gitbook.io/magicmi/running-magicmirror/more-docker-tricks#one-command-that-does-it-all). By executing only one command, you get your outputs right away in your designated output folder.&#x20;

## Running MagicMirror

MagicMirror has two modes, `single-file-mode` and `batch-mode`, which corresponds to executing a single contract, or a batch of contracts. You can find the quick start and more details for running MagicMirror in these modes in [single-file-mode](https://magic-mirror.gitbook.io/magicmi/running-magicmirror/single-file-mode) and [batch-mode](https://magic-mirror.gitbook.io/magicmi/running-magicmirror/batch-mode).
