Docker Folder Summary
π Created Files
Core Files
Dockerfile - Main production Dockerfile based on working image
96a7bd158ecb.dockerignore - Optimized ignore file to reduce build context size
deploy.sh - Script to build and push Docker image to AWS ECR
update-ecs.sh - Script to update AWS ECS service with new image
Documentation
README.md - Complete guide for using the Docker setup
COMPARISON.md - Detailed comparison between previous working image and current setup
SUMMARY.md - This file
π Key Improvements Based on Working Image
Previous Working Image (mainnet-update)
mainnet-update)Image ID:
96a7bd158ecbDigest:
sha256:96a7bd158ecb93b459fca9e65155fed14e233328d921a42d6b2a7f69bb0cf3d6.NET 9.0.9, Ports 80/443, Included OASIS_DNA.json
Current Dockerfile Improvements
β Solution File Restoration: Uses
The OASIS.slnto restore all dependenciesβ Fallback Strategy: Falls back to project restore if solution restore fails
β Optimized Build Context: Better
.dockerignoreto reduce build sizeβ Provider Inclusion: Ensures all 30+ providers are included
β Configuration: Handles OASIS_DNA.json (can use env vars as fallback)
π Usage
Build and Deploy
Update ECS Service
π Build Context Optimization
The .dockerignore file excludes:
Test projects and harnesses
Documentation files
Build outputs (bin/, obj/)
Large unrelated projects (meta-bricks-main, TimoRides, etc.)
IDE files
Included (needed for build):
ONODE/ (WebAPI and Core)
OASIS Architecture/ (Core, DNA, BootLoader, Common)
Providers/ (all provider projects)
External Libs/ (dependencies)
NextGenSoftware-Libraries/ (utilities, logging)
holochain-client-csharp/ (referenced in solution)
π§ Configuration
Environment Variables
ASPNETCORE_ENVIRONMENT=ProductionASPNETCORE_URLS=http://+:80
Ports
80: HTTP
443: HTTPS
Health Check
Endpoint:
/swagger/index.htmlInterval: 30s
Timeout: 3s
Retries: 3
π Next Steps
Test the build locally:
If build succeeds, deploy:
Update ECS service:
π Troubleshooting
Build Context Too Large
Check
.dockerignoreto ensure unnecessary directories are excludedCurrent optimized size: ~6MB (down from 1.44GB)
Missing Dependencies
Ensure
NextGenSoftware-Librariesandholochain-client-csharpare checked out locallyThese are not Git submodules but regular directories
Solution File Errors
The Dockerfile has a fallback to project restore if solution restore fails
Test projects are excluded via
.dockerignoreto avoid missing project errors
π Related Files
Root
Dockerfile.production- Can be updated to usedocker/DockerfileRoot
deploy-docker.sh- Can be updated to usedocker/deploy.shRoot
update-ecs-service.sh- Can be updated to usedocker/update-ecs.sh
Last updated