# Docker

{% hint style="info" %}
The current [`official Docker image`](https://hub.docker.com/_/monica/) hosted on DockerHub is based on the previous major version of Monica. We'll update it soon to the new version, codename Chandler.
{% endhint %}

We have a [docker image](https://github.com/monicahq/chandler/pkgs/container/monica-next) that you can use to run this project locally.

First you need setup [authentication to the Container registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-to-the-container-registry).

Then play with the image:

```sh
docker run -p 8080:80 ghcr.io/monicahq/monica-next:main
```

This runs the image locally on port 8080 and using sqlite. You can then access the application at <http://localhost:8080>.

#### Configuration

Note that you'll need to setup a mail mailer to be able to register a user. You can try to use the `log` mailer like this:

```sh
docker run -p 8080:80 -e MAIL_MAILER=log ghcr.io/monicahq/monica-next:main
```

For more complex scenario (database setup, queue, etc.) see <https://github.com/monicahq/docker/tree/main/.examples>

#### Build it yourself

You can also build your image locally using `yarn docker:build` and run it with `yarn docker:run`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.monicahq.com/developers/docker.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
