mirror of
https://github.com/d0zingcat/deploy.git
synced 2026-05-13 23:16:53 +00:00
68 lines
1.8 KiB
Markdown
68 lines
1.8 KiB
Markdown
# Docker
|
|
|
|
## Why use Docker Compose?
|
|
|
|
Using Docker for Hummingbot deployment offers several benefits, such as simplifying the installation process, enabling easy versioning and scaling, and ensuring a consistent and isolated environment for running the bot. This repository aims to help users get started with deploying Hummingbot using Docker by providing different examples that demonstrate how to set up and customize the bot according to their needs.
|
|
|
|
The recommended way to get Docker Compose is to install [Docker Desktop](https://www.docker.com/products/docker-desktop/), which includes Docker Compose along with Docker Engine and Docker CLI which are Compose prerequisites.
|
|
|
|
Docker Desktop is available on:
|
|
|
|
* [Linux](https://docs.docker.com/desktop/install/linux-install/)
|
|
* [Mac](https://docs.docker.com/desktop/install/mac-install/)
|
|
* [Windows](https://docs.docker.com/desktop/install/windows-install/)
|
|
|
|
## Useful Docker Commands
|
|
|
|
Use the commands below or use the Docker Desktop application to manage your containers:
|
|
|
|
### Create the Compose project
|
|
```
|
|
docker compose up -d
|
|
```
|
|
|
|
### Stop the Compose project
|
|
```
|
|
docker compose down
|
|
```
|
|
|
|
### Update the Compose project for the latest images
|
|
```
|
|
docker compose up --force-recreate --build -d
|
|
```
|
|
|
|
### Give all users read/write permissions to local files
|
|
```
|
|
sudo chmod -R a+rw <files/folders>
|
|
```
|
|
|
|
### Attach to the container
|
|
```
|
|
docker attach <container-name>
|
|
```
|
|
|
|
### Detach from the container and return to command line
|
|
|
|
Press keys <kbd>Ctrl</kbd> + <kbd>P</kbd> then <kbd>Ctrl</kbd> + <kbd>Q</kbd>
|
|
|
|
|
|
### Update the container to the latest image
|
|
```
|
|
docker compose up --force-recreate --build -d
|
|
```
|
|
|
|
### List all containers
|
|
```
|
|
docker ps -a
|
|
```
|
|
|
|
### Stop a container
|
|
```
|
|
docker stop <container-name>
|
|
```
|
|
|
|
### Remove a container
|
|
```
|
|
docker rm <container-name>
|
|
```
|