Host to container networking
TLDR;
Opctl supports using ports statements to bind opctl container ports to opctl node host ports.
Example
- Start this op:
name: curl
run:
container:
image: { ref: nginx:alpine }
ports:
# bind container port 80 to host port 8080
80: 8080 - On the opctl host, open a web browser to localhost:8080.
- Observe the nginx containers default page is returned.