How do I communicate with an opctl container?

TLDR;

Adding a ports attribute to a container binds container ports to the opctl host.

Example

  1. Start this op:
    name: curl
    run:
    parallel:
    - container:
    image: { ref: nginx:alpine }
    ports:
    # bind container port 80 to host port 8080
    80: 8080
  2. On the opctl host, open a web browser to localhost:8080.
  3. Observe the nginx containers default page is returned.
Last updated on by Chris Dostert