#Getting `Service.up(ports: [{front-end:

1 messages · Page 1 of 1 (latest)

faint saddle
#

Can you share what commands you're running and what the function is returning?

undone blaze
#

Function (named serve) returns

Container.as_service().up(ports=[PortForward(backend=8080, frontend=8080)]

Calling it with
Dagger call with-params <params here> serve

#

Container is working, I can run dagger call with-params <params here> build terminal where build is a function that provides Container to serve and that puts me in the terminal as expected

faint saddle
#

Got it! I haven't tried returning the service with up() before. Can you try removing the .up(), and run dagger call with-params <params here> serve up (adding up to the command line). Also make sure the container has a with_exposed_port

undone blaze
#

Trying that now. Container has an exposed port, I presume without providing the PortForward it'll just map to the same port on the host now?

#

That's worked, bit of a change from pre-Zenith but I'm fine with that, thanks @faint saddle

faint saddle
#

Awesome! Yes by default it'll map to the same port as the host, but you can also specify it with ... up --ports 8081:8080 or random port with ... up --random

#

I think the fact that nothing was being forwarded in your original function feels like a bug cc @hot cargo

undone blaze
#

Seemed like it. The frontend param can be None according to the PortForward docs, but the backend can't be None, seems too coincidental that the backend value provided stuck but the nullable frontend value didn't. Happy to leave it as is anyway

hot cargo