500 Internal Server Error while generating task definition for Google Cloud Run
256
Created On 01/01/26 03:32 AM - Last Modified 02/19/26 18:08 PM
Symptom
- 500 Internal Server Error while generating task definition for Google Cloud Run
Environment
- Prisma Cloud Compute
- Google Cloud Platform
Cause
- Required Command missing in the configuration.
- Console debug logs show the missing command/error.
route_handler.go:15032 Operation failed: uri=/api/v1/defenders/cloud-run.yaml?project=Central+Console&consoleaddr=asia-southeast1.cloud.twistlock.com&interpreter=&filesystemMonitoring=false&defenderImage=https:%!F(MISSING)%!F
(MISSING)asia-southeast2-docker.pkg.dev%!F(MISSING)rnd-it-cimb-niaga%!F(MISSING)rnd-it-cimb-niaga%!F(MISSING)twistlock-defender-app-embedded:latest; error=container
'test-defender-function-1' does not have a command defined, which is required for modification
Resolution
- Add the command/entrypoint inside the container.
- Once added, the app-embedded YAML is generated successfully.
containers:
- name: test-defender-function-1
image: asia-southeast2-docker.pkg.dev/xxxxx/xxxx/test-defender-function@sha256:5a7e78e042071b77d44a6e6d70b86f6a584c51c755ab582cd1377e0c12d2d8d1
command: ["xxxxxxx"]
spec:
containers:
# FIX 2: Explicitly name the container so the Defender knows what to wait for
- name: my-web-app
image: us-central1-docker.pkg.dev/project-id/GoogleArtifact-repo-name/application image name
# FIX 3: Force Nginx to run in foreground (Prevents Exit Code 255)
command: ["nginx", "-g", "daemon off;"]
- Note: The image name can be copied accurately by navigating to the GAR > Click on the image name > Show pull command > Pull by tag
- Once this is added, the app-embedded defender yaml is generated without issues.
Additional Information
NA