> For the complete documentation index, see [llms.txt](https://docs.alphaus.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.alphaus.cloud/v2.0-english/guides-and-tutorials/docker/custom-docker-containers.md).

# Custom Docker containers

## Deploy custom Docker containers

It is possible to deploy your own docker container on mobingi ALM. Simply type in the name of your docker image on docker hub and you are ready to go.

{% hint style="info" %}
Docker images that are not modified to have a configuration file and container\_status files will not be able to take advantage of [Blue-Green Deployment](https://docs2.mobingi.com/v/v2/guides-and-tutorials/others/blue-green-deployment), and code deploys will write into the `/var/www` folder.
{% endhint %}

Mobingi ALM also automatically maps port 80 and 443 exposed by the container to the port 80 and 443 respectively on the machine. Other ports are ignored.<br>

## Configuration file

If a custom docker container does not have a configuration file, mobingi ALM will immediately switch new connections to the new container the moment it starts. If your docker container needs to perform certain tasks before it is able to start, it needs to signal that it is ready to accept connections.

Without a configuration file also, mobingi ALM will only deploy code into the `/var/www` folder.

In order to enable [Blue-Green Deployment](https://docs2.mobingi.com/v/v2/guides-and-tutorials/others/blue-green-deployment) and specify a specific folder for the code deploys to place code in, the container must have the following things:

* A config file in the root directory
* The startup command must write running into the `/var/log/container_status` file when it is ready to accept connections.

This is an example config file:

```ruby
{
   "codeDirectory": "/srv/code"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.alphaus.cloud/v2.0-english/guides-and-tutorials/docker/custom-docker-containers.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
