You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can expose sockets (and similar concepts like TTYs).
One classic use case is an e2e test that needs to run against a live database. Also may include use cases like hot-reloading web dev servers, interactive containers hooked up to a user's terminal, etc.
This is a pretty broad issue, should be broken down into subtasks.
Reacted by Christian, Gambler13, El-Hussein Abdelwahab, Jens Breuer, thiago lopes silva, sheldonhull and Imre Hajagos
One idea for exposing sockets: you can query the socket in the graphql api, but the value returned is just an endpoint in the cloak server (separate from the /query graphql endpoin) that can be connected to over websocket.
Websockets are nice in that they can transport a wide variety of protocols (can forward tty, tcp streams, udp datagrams, etc.) while also being compatible with both client libraries running in a binary/script on the host (e.g. cloak cli, any of our sdks, etc.) and web browsers.
Would love to see this feature in near future. In Gitlab you can easily use the services keyword to start a new container asynchronous on the same network. I tried a workaround with the docker.#Run action, but unfortunately the service container is running forever.
Perhaps the parts of #4080 that depend on services (c2c and h2c) should be spun out and moved here? That way, #4080 would be limited in scope to c2h networking, and could be closed potentially very soon.
I know one part of using dagger for me is the ability to spin up services that keep running and allow more integration type tests to run. While I would try to use a dockertest package or such in Go, there's some stuff that just makes sense to be stateful to test and iterate on, such as ng serve for Angular, or maybe even hugo serve type commands where I want to run and leave it running with refresh.
I'm following this issue and if there's a better one for services let me know. Excited to see where this goes :-)
Activity
sipsma commentedon Sep 2, 2022
One idea for exposing sockets: you can query the socket in the graphql api, but the value returned is just an endpoint in the cloak server (separate from the
/querygraphql endpoin) that can be connected to over websocket.Websockets are nice in that they can transport a wide variety of protocols (can forward tty, tcp streams, udp datagrams, etc.) while also being compatible with both client libraries running in a binary/script on the host (e.g.
cloakcli, any of our sdks, etc.) and web browsers.Gambler13 commentedon Sep 17, 2022
Would love to see this feature in near future. In Gitlab you can easily use the
serviceskeyword to start a new container asynchronous on the same network. I tried a workaround with thedocker.#Runaction, but unfortunately the service container is running forever.shykes commentedon Jan 5, 2023
Related: #4080 which I believe is a requirement for this issue (no point in running services if you can't connect to them).
shykes commentedon Jan 5, 2023
Perhaps the parts of #4080 that depend on services (c2c and h2c) should be spun out and moved here? That way, #4080 would be limited in scope to c2h networking, and could be closed potentially very soon.
WDYT @sipsma @vito ?
sheldonhull commentedon Jan 26, 2023
I know one part of using dagger for me is the ability to spin up services that keep running and allow more integration type tests to run. While I would try to use a dockertest package or such in Go, there's some stuff that just makes sense to be stateful to test and iterate on, such as
ng servefor Angular, or maybe evenhugo servetype commands where I want to run and leave it running with refresh.I'm following this issue and if there's a better one for services let me know. Excited to see where this goes :-)
mircubed commentedon Feb 24, 2023
Closing this since #4505 was merged. Please create a new task for any additional work that needs to be done.