> For the complete documentation index, see [llms.txt](https://guide.fariaedu.com/professional-learning-community-mbpy/6VBx07Zj330EYGI5zHno/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.fariaedu.com/professional-learning-community-mbpy/6VBx07Zj330EYGI5zHno/installation/mac.md). Agents can also search and read this documentation through its [MCP server](https://guide.fariaedu.com/professional-learning-community-mbpy/6VBx07Zj330EYGI5zHno/~gitbook/mcp).

# Getting Started using Docker

Installing mbpy

### Getting started with Docker

Download [Docker ](https://docker.com)and ensure it's running on your machine.

### Install with Docker

We need to get the `mbpy` command in our terminal. First, this command only needs to run once:

```
cd mbpy
docker compose up --build
```

If you are new to docker, that command will build the image and make the container accessible through a default name, which in this case is `mbpy_mbpycli`. It is using the docker files in the codebase to determine all the settings.

If successful, the terminal will output the version number.

### Executing with Docker&#x20;

#### **From inside the container:**

Once the docker image has been built you have some choices on how to actually execute mbpy. The sure-fire way is to connect to the docker container, and run commands directly from within the container. This is a good getting-started method to explore.

You can do that with this command:

```
docker run -it --entrypoint bash --rm mbpy_mbpycli
```

There, you can simply use the `mbpy` command line in the container itself.&#x20;

For example, `mbpy import students` and then `mbpy extract from-db --table students chain info.`To exit, type `exit`. Note that with this method, the import data will not persist the next time you run docker with this method. (See [Further Instructions](https://guide.fariaedu.com/professional-learning-community-mbpy/6VBx07Zj330EYGI5zHno/installation/further-instructions-with-docker.md) on how to persist across executions).

#### **From the host:**

Execute the application automatically from the host with the following command, you can execute the same as above, but without the `--entrypoint bash` part, and then tack on to the end the commands. For example, to output the version number:

```
docker run -it --rm mbpy_mbpycli version
# or:
docker run -it --rm mbpy_mbpycli import students
```

Note however this method does not persist across executions. To learn how to enable the ability to persist, see [Further Instructions](https://guide.fariaedu.com/professional-learning-community-mbpy/6VBx07Zj330EYGI5zHno/installation/further-instructions-with-docker.md).
