> For the complete documentation index, see [llms.txt](https://cleberjamaral.gitbook.io/mind/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cleberjamaral.gitbook.io/mind/knowledge/it/containers-1/deploying-from-the-hub.md).

# deploying from the hub

Some [docker useful commands](https://gist.github.com/cleberjamaral/fd28876eba0065cf3d8f28e8a5b3a9c3) reference.

Examples assume there is an image at the following docker hub address <https://hub.docker.com/repository/docker/cleberjamaral/jacamo-rest-run>&#x20;

### Creating and running an image

* Building and assigning the tag `user/image_id`to the local image `$ sudo docker build -t user/image_id .`
* Check existing images `$ sudo docker images`
* Create a network `$ sudo docker network create network_name`
* Run a docker image `$ sudo docker run -ti user/image_id a_command`
  * Example `$ docker run -d -P -p 8888:8080 -ti cleberjamaral/jacamo-rest-run sh`&#x20;

### Pulling an image from a docker repository and running the terminal

* Pulling an image from docker hub `$ sudo docker pull user/image_id:tag`
  * Example `$ docker pull cleberjamaral/jacamo-rest-run:latest`
* Running an instance and opening the terminal `$ docker run -ti repository_id sh`
  * Example `$ docker run -ti cleberjamaral/jacamo-rest-run sh`
* Attaching to a running container `$ docker attach container_id`

### Removing an image

* Removing an image `$ sudo docker image rm image_id`
  * To force removing associated container `$ sudo docker image rm image_id -f`


---

# 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:

```
GET https://cleberjamaral.gitbook.io/mind/knowledge/it/containers-1/deploying-from-the-hub.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.
