Troubleshooting Docker Container Errors
This article covers common issues that can occur with Docker containers used in your challenges or simulations—from image building to container runtime.
If you’re a CTF author or challenge creator and encountering problems when deploying Docker Containers on Simulations Labs, this guide will help you identify and fix them.
502 Error When Starting a Challenge (Docker-Based)
If you're seeing a 502 Bad Gateway error after clicking "Start Challenge" for a Docker-based simulation, it means the platform couldn’t connect to your container.
This issue usually relates to how your Docker container is configured. Below are the most common causes and how to fix them.
Common Causes & Solutions
1. Insufficient Resources Assigned to the Image
If the Docker container is using more CPU or memory than what’s assigned, it may fail to start correctly—resulting in a 502 error.
How to Fix:
Go to the Image Manager on the platform.
Edit the image and increase the CPU and memory limits as needed.
Save and retry the challenge.
2. Incorrect Port Configuration
Simulations Labs expects your Docker container to serve traffic on port 80 using the HTTP protocol.
How to Fix:
If your app uses a different port (e.g., 5000, 8080), you have two options:
Option 1: Change your container to run on port 80.
Option 2: update the image settings:
Go to the Image Manager
Edit the image’s port setting to match the port your app is using inside the container
3. Non-HTTP Protocol (e.g., TCP)
Simulations Labs uses the HTTP protocol to communicate with containers. If your container uses another protocol like TCP, the connection will fail.
How to Fix:
Make sure your application serves content over HTTP on port 80 (or the port you’ve set in Image Manager).
Checklist Before Uploading Your Docker Container File
Test container locally
Ensure the internal port is 80 or matches the port set in Image Manager
Verify that the container uses HTTP, not TCP or another protocol
Need Help?
Still stuck? Please:
Include the full Dockerfile or relevant build logs.
Attach Screenshot of the error.
Reach out to info@simulationslabs.com
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article