{"repo":"JacobLinCool/workerd-docker","free":true,"listed":false,"github":"https://github.com/JacobLinCool/workerd-docker","clone":"git clone https://github.com/JacobLinCool/workerd-docker.git","description":"This minimalist Docker image allows you to run a Cloudflare Worker inside a Docker container, offering a simple solution for deploying and testing your worker on your infrastructure.","language":"Dockerfile","stars":32,"topics":["cloudflare-workers","docker","self-hosted","workerd"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"Workerd Docker Image Supported Architectures: amd64 , arm64 This minimalist Docker image allows you to run a Cloudflare Worker inside a Docker container, offering a simple solution for deploying and testing your worker on your infrastructure. - Docker Hub - GitHub Repository Quick Start Guide Selflare The fastest way to get your Cloudflare Worker running as a Docker container is to use Selflare, which also supports KV, D1, R2, DO, and Cache API out of the box. You can now access your worker at http://localhost:8080 ! Manual Setup If you prefer to set up the Cap'n Proto manually, follow the steps below. 1. Prepare Your Worker First, build your worker with Wrangler by running the following command in your project directory: This command compiles your worker and outputs the result script to .wrangler/dist/index.js . 2. Configure worker.capnp Next, create a worker.capnp file in the same directory as your wrangler.toml . This file is used to configure the Workerd runtime. Below is a template you can start with: For detailed information on configuring worker.capnp , refer to the Workerd Repository. 3. Run the Docker Image With your worker built and configured, you're ready to run it inside a Docker container. Execute the following command: This command mounts your current directory to the /worker directory inside the container and forwards port 8080 to your local machine. Accessing Your Worker After starting the Docker container, your worker will be accessible at http://localhost:8","default_branch":null,"files":null,"tree":[],"storefront":"/r/JacobLinCool","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/JacobLinCool/workerd-docker/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}