Hi ,
Thanks for reaching out to Microsoft Q&A.
Key Points to note:
- ACI via
containerGroups
do not use Ingress like Azure Container Apps. Instead, they expose public IP addresses directly using theipAddress
andports
settings (which you already have). - Exit code 134 typically means your container is crashing due to a runtime error like a memory issue, segmentation fault, or abort from your application.
- Your ACI config seems correct for exposing the container publicly. But the crash is preventing it from being reachable.
Fix Checklist:
Ingress Exposure (Container Group)
You already have:
"ipAddress": {
"type": "Public",
"ports": [
{ "protocol": "tcp", "port": 80 },
{ "protocol": "tcp", "port": 8080 }
]
}
This is the correct way to expose a container in ACI. Once deployed, you should be able to access the app via the output IP and respective port (e.g., http://<containerIPv4Address>:8080
).
Common Reasons for Exit Code 134:
Your app (inside the container) is not happy with the environment or is crashing.
Missing environment variables or secrets.
Port mismatch: container is exposing port 8080, but the app is listening on a different one.
Container expects a specific startup file or config that is missing.
Suggestions to Fix:
- Check container logs:
This will show what caused the crash (often more informative than exit code alone).az container logs --name <containerGroupName> --resource-group <resourceGroupName>
- Use
command
override for debugging: Temporarily override the container's startup command to just keep it running:
This lets you exec into the container:"command": ["/bin/sh", "-c", "sleep 3600"]
az container exec --resource-group <rg> --name <containerGroupName> --exec-command "/bin/sh"
- Verify exposed ports match app’s listening port: If your app is listening on 8081 but you exposed 8080, it will not respond. Use:
EXPOSE 8080
CMD ["npm", "start"]
Or whatever is appropriate in your container image.
Note:
If you want more builtin ingress control, scaling, authentication, or lifecycle management (start/stop), Azure Container Apps are a better fit. You can start/stop Container Apps via Logic Apps using REST or PowerShell actions.
Please feel free to click the 'Upvote' (Thumbs-up) button and 'Accept as Answer'. This helps the community by allowing others with similar queries to easily find the solution.