Skip to main content

Overview

The m87 CLI provides seamless Docker integration, allowing you to run any Docker command on remote devices as if you were working locally. This includes full support for Docker Compose for deploying multi-container applications.

Docker Command

Execute Docker commands on remote devices using Docker passthrough.

Syntax

All standard Docker commands and flags are supported.

Prerequisites

Before using Docker commands:
  1. Docker must be installed on the remote device
  2. The device user must be in the docker group or have root permissions
  3. Docker daemon must be running
To add user to docker group:

Container Management

List and Inspect Containers

Container Lifecycle

Bulk Operations

Be careful with bulk operations. Always verify which containers will be affected by running m87 <device> docker ps first.

Image Management


Docker Compose

Deploy and manage multi-container applications with Docker Compose.

Basic Compose Commands


Example: Simple Compose Project

Here’s a working example that demonstrates Docker Compose with m87:

docker-compose.yml

Deploy Example


Advanced Docker Commands

Network Management

Volume Management

System Information


Real-World Workflows

Deploy Web Application

Database Backup

Development with Hot Reload

Container Debugging


Docker with Port Forwarding

Access containerized services locally:

Troubleshooting

Check Docker Status

Permission Issues

Container Won’t Start


Performance Tips

Optimize Docker operations:
  • Use .dockerignore to exclude unnecessary files from build context
  • Use multi-stage builds to reduce image size
  • Clean up unused images and containers regularly with docker system prune
  • Use specific image tags instead of latest for reproducibility
  • Mount volumes for persistent data instead of storing in containers