Docker Commands
Managing Stacks
- List all stacks:
docker stack ls - View active and past services of a stack:
docker stack ps STACK_ID - View logs for a specific service:
docker service logs SERVICE_ID
Managing Containers
- List all running containers:
docker ps - View logs of a specific container:
docker logs CONTAINER_ID - View the last 100 log lines of a container:
docker logs --tail 100 CONTAINER_ID
Viewing Configurations
- List all configuration files:
cd /var/opt ls -al `` - Navigate to DeployParty configuration directory:
cd deploy -party/ ls -al - View a specific configuration file:
cat FILE_NAME
Viewing Command History
- Search for specific commands in history (e.g., GitLab token):
history | grep COMMAND
Useful Commands
- Show memory usage:
free -m - Show disk partitions and usage:
df -h - Show CPU usage:
top - Clean up unused Docker resources:
docker system prune - Check currently used ports:
lsof -i -P -n | grep LISTEN