Blog
How to Deploy a Docker Container
How to deploy a Docker container to production: write a solid Dockerfile, expose the right port, avoid secrets in images — and how Runex runs Docker workloads without Kubernetes ops.
· Updated · 2 min read
Direct answer
Deploying a Docker container means building an image from a Dockerfile, running it with the correct port and environment, and exposing HTTPS safely. On Runex, put a Dockerfile in your GitHub repository; Runex builds and runs it in isolation on *.runex.cloud.
Product landing: Deploy Docker on Runex.
Dockerfile basics that matter in production
- Prefer minimal base images
- Run as a non-root user when practical
- Do not copy
.envsecrets into the image EXPOSEthe port your process actually listens on- Bind the server to
0.0.0.0
Deploy Docker with Runex
- Add a production Dockerfile to the repo
- Install the Runex GitHub App and select the repository
- Deploy the branch; Runex builds the image
- Verify
https://<deployment-slug>.runex.cloud - Attach a custom domain via
cname.runex.cloudwhen needed
You do not need to operate Kubernetes yourself for this path.
Configuration
Inject runtime config with environment variables. Keep build context small; never mount the Docker socket for untrusted apps.
Troubleshooting
- Image build errors — read build logs; see deployment failed
- Container up but unreachable — port configuration