This lab has been modernised but not yet verified end to end. Tell us if something breaks.
Troubleshooting Containerized Apps
Lab Solution
My solution is here:
Copy it to the main folder so the config paths are correct, and the app will work:
cp labs/troubleshooting/lab/solution.yml labs/troubleshooting/
docker compose -f labs/troubleshooting/solution.yml up -dUse the app at http://localhost:8090
Validation failures
- The image name is incorrect for the web component. You'll see a
manifest unknownerror.
- Not enough CPUs - the web application request
25CPUs, which is a typo - it should be2.5. Unless you have a mega powerful machine, Docker can't allocate enough CPUs to create the container.
Startup failures
- Incorrect entrypoint for the API. It's specifying the command to run but
dontetis a typo. You'll seeexecutable file not found in $PATH- it should bedotnet.
- Duplicate port mapping - both the web app and API are trying to publish port
8089. You'll seeport is already allocated- the web app should be publishing to port8090.
Runtime failures
- The API container exits after starting. Check the logs and you'll see
the application was not found. The volume mount is incorrect - it's loading the config folder into the/appfolder, which overwrites the contents from the image so there is no application binary. The volume target should be/app/config.
Networking failures
- Try using the website and you'll get the
RNG service unavailable!error. The web container logs show you the app is using the correct URL, but if you runnslookupthe API container can't be found. The spec uses two different networks, so the containers aren't connected - the web container needs to attach to theapp-netnetwork.
Back to the exercises.