OASIS API Docker Deployment Update Guide
Current Image Status
Current Deployed Image:
Digest:
sha256:3be9fbbd667475a86adf1215e28d67885bf98ff480d049e4039a937e5951b5f0Tags:
latest,v20251209-214104Pushed: December 9, 2025
Size: ~259 MB
Location:
881490134703.dkr.ecr.us-east-1.amazonaws.com/oasis-api
ECS Task Definition:
File:
oasis-api-task-definition.jsonFamily:
oasis-api-taskCluster:
oasis-api-clusterService:
oasis-api-service
Dockerfile Location
The production Dockerfile is located at:
/Volumes/Storage/OASIS_CLEAN/docker/DockerfileNote: The Dockerfile in the docker/ directory was previously empty. It has now been updated to build the ONODE WebAPI with proper external library handling.
What Changed
Previous Setup
The root
Dockerfilewas building the STAR WebAPI (not ONODE WebAPI)The
docker/Dockerfilewas emptyExternal libraries handling was unclear
Current Setup
✅
docker/Dockerfilenow builds ONODE WebAPI correctly✅ Handles external libraries properly:
External Libs/(IPFS client)holochain-client-csharp/(Holochain client)NextGenSoftware-Libraries/(Utilities, logging, etc.)
✅ Uses .NET 9.0 (matching current build)
✅ Includes all provider projects
✅ Proper multi-stage build for optimization
How to Update the Deployed Image
Step 1: Build and Push New Image
This script will:
Authenticate with AWS ECR
Build the Docker image with tags:
latestandv{timestamp}Push both tags to ECR
Display the new image digest
Step 2: Update ECS Service
After the image is pushed, update the ECS service:
Step 3: Verify Deployment
Check the ECS service status:
Dockerfile Structure
The Dockerfile uses a multi-stage build:
Base Stage: .NET 9.0 runtime with curl for health checks
Build Stage:
Copies solution and project files
Copies external libraries
Restores dependencies
Copies all source code
Builds the application
Publish Stage: Publishes the application
Final Stage: Copies published files to runtime image
Key Configuration
Ports
80: HTTP (container)
443: HTTPS (container)
Environment Variables
Set in ECS task definition:
ASPNETCORE_ENVIRONMENT=ProductionASPNETCORE_URLS=http://+:80ConnectionStrings__MongoDBOASIS=...
Health Check
Endpoint:
/swagger/index.htmlInterval: 30s
Timeout: 10s
Start Period: 60s
Retries: 3
External Libraries Handling
The Dockerfile properly handles:
External Libs/ - IPFS HTTP client
Copied before restore to ensure availability
holochain-client-csharp/ - Holochain client
Copied before restore
NextGenSoftware-Libraries/ - Core utilities
Copied before restore
Includes: Utilities, ErrorHandling, Logging, WebSocket, etc.
Provider Projects - All 30+ blockchain providers
Key providers copied explicitly
Remaining providers included via
COPY . .
Troubleshooting
Build Fails with Missing Dependencies
Ensure all external libraries are present:
Build Context Too Large
Check .dockerignore in the docker/ directory. It should exclude:
Test projects
Documentation
Build outputs
Large unrelated projects
Image Push Fails
Verify AWS credentials:
Verify ECR access:
Re-authenticate Docker:
Next Steps
Test Build Locally (optional):
Deploy to AWS:
Monitor Deployment:
Check ECS service logs in CloudWatch
Verify health checks are passing
Test API endpoints
Related Files
docker/Dockerfile- Production Dockerfiledocker/deploy.sh- Build and push scriptdocker/update-ecs.sh- ECS service update scriptdocker/.dockerignore- Build context exclusionsoasis-api-task-definition.json- ECS task definitionDOCKER_CONTEXT.md- Detailed Docker context documentation
Last Updated: December 17, 2025 Status: Ready for deployment
Last updated