- Docker Desktop installed and running
- Docker Compose installed
- VS Code with Dev Containers extension (for development)
Important: Make sure Docker Desktop is running before executing docker commands!
# Copy the environment template
cp .env.example .env
# Edit .env with your API keys and configuration# First, ensure Docker Desktop is running!
docker version
# If you get an error, start Docker Desktop from Windows Start Menu# Build and start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down# If using Windows containers
docker-compose -f docker-compose.windows.yml up -d# If you have SQL Server Express installed locally
docker-compose -f docker-compose-local.yml up -d
# Access services:
# - API: http://localhost:5000
# - UI: http://localhost:3003# Start with development profile (includes hot reload)
docker-compose --profile dev up -d
# Access services:
# - API: http://localhost:5000
# - UI: http://localhost:3003
# - SQL Server: localhost:1433
# - Redis: localhost:6379- Open VS Code
- Install "Dev Containers" extension
- Open Command Palette (F1)
- Run "Dev Containers: Open Folder in Container"
- Select the cryptobot folder
- VS Code will rebuild and open in the container
- .NET Framework: Use Mono debugger
- .NET Core API: F5 to start debugging
- Angular UI: Use Chrome DevTools
# Build main application
docker build -t cryptobot:latest .
# Build development image
docker build -f Dockerfile.dev -t cryptobot:dev .# Connect to SQL Server
docker exec -it cryptobot-db /opt/mssql-tools/bin/sqlcmd \
-S localhost -U sa -P "CryptoBot@2024!"
# Backup database
docker exec cryptobot-db /opt/mssql-tools/bin/sqlcmd \
-S localhost -U sa -P "CryptoBot@2024!" \
-Q "BACKUP DATABASE CryptoBot TO DISK = '/var/opt/mssql/backup/CryptoBot.bak'"# View running containers
docker ps
# View all containers
docker ps -a
# View logs
docker logs cryptobot-app
# Enter container shell
docker exec -it cryptobot-app bash
# Clean up volumes
docker-compose down -v- cryptobot: Main application (Windows container with IIS)
- sqlserver: SQL Server Express 2022
- redis: Redis cache for session management
- cryptobot-api-dev: Development API with hot reload
- cryptobot-ui-dev: Development UI with hot reload
sqlserver-data: Persistent SQL Server dataredis-data: Persistent Redis data./logs: Application logs (mapped to host)./config: Configuration files (mapped to host)
cryptobot-network: Bridge network for service communication
# Error: "The system cannot find the file specified"
# Solution: Start Docker Desktop from Windows Start Menu
# Verify Docker is running
docker versionIf ports are already in use, modify the port mappings in docker-compose.yml:
ports:
- "8080:80" # Change 8080 to desired port# Check SQL Server logs
docker logs cryptobot-db
# Test connection
docker exec cryptobot-db /opt/mssql-tools/bin/sqlcmd \
-S localhost -U sa -P "CryptoBot@2024!" -Q "SELECT 1"SQL Server Express is limited to 2GB RAM. If you need more:
- Remove
MSSQL_MEMORY_LIMIT_MBfrom docker-compose.yml - Change
MSSQL_PID=ExpresstoMSSQL_PID=Developer
# Clean Docker cache
docker system prune -a
# Rebuild without cache
docker-compose build --no-cache- Change default passwords in production
- Use Docker secrets for sensitive data
- Enable TLS/SSL for production deployments
- Regularly update base images
- Scan images for vulnerabilities:
docker scan cryptobot:latest