1.5 KiB
1.5 KiB
Docker & DevOps Skill
System Configuration
- Docker 29.2.1 installed
- Docker Compose plugin available
- User 'ren' added to docker group
- AMD GPU (RX 6800 XT) with ROCm support for GPU containers
Common Commands
Docker Basics
docker ps # List running containers
docker ps -a # List all containers
docker images # List images
docker-compose up # Start services
docker-compose up -d # Start in background
docker-compose down # Stop services
docker-compose build # Build images
docker logs <container> # View logs
docker exec -it <container> bash # Enter container
ROCm GPU Support
# Run with AMD GPU support
docker run --device=/dev/kfd --device=/dev/dri --group-add video -it rocm/rocm-terminal
# Docker Compose with GPU
services:
app:
devices:
- /dev/kfd
- /dev/dri
group_add:
- video
environment:
- HSA_OVERRIDE_GFX_VERSION=10.3.0
Best Practices
- Use multi-stage builds for smaller images
- Always specify versions in FROM statements
- Use .dockerignore to exclude unnecessary files
- Mount volumes for persistent data
- Use docker-compose for multi-container apps
Common Issues
- If permission denied: user is in docker group but may need re-login
- GPU not visible: check ROCm installation with
rocminfo - Port conflicts: use
docker psto check used ports