cloudflare / cloudflare/containers
Documentation / functionality of start method incorrect?
- Dominant language
- TypeScript
- Stars
- 270
- Forks
- 42
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 4
Description
In the documentation on the readme for the `start` method, it states start should be used for a number of scenarios, one of which is if you want to "Initialize a container that doesn't expose ports". I created such a container as that, exposing no ports and specifying no default port. Upon starting the container in my local development environment (wrangler, vite-plugin), I can see that the container processes properly since it is waiting on no actual input, however the worker that started the container continually outputs `Error checking if container is ready: The operation was aborted` until finally outputting:
```
Container error: undefined
Failed to start container: Error: undefined
```
If I change the container to expose a port and then watch for it, then I only get a single error of `Error checking if container is ready: The operation was aborted` before it recognizes that the container started properly. Given that I want a container to simply start up, process a request, and then shut itself off (much like a worker except with access to more resources), the necessity to expose a port is a little odd here.
I noted in the code that it seems like, if no port is specified, it eventually falls back to port 33 to check for creation. Curious if I am missing something or if the functionality is indeed that an exposed port is explicitly required.
Contributor guide
Assessment
This issue has not been assessed yet.