-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can we connect to a running job ? #33
Comments
So you want to be able to attach to a running docker container that executes a Sparky job? I might be wrong, but in that case, you'll need an ssh access to a host that runs a Sparky ... |
You don't need ssh access Here is a detailed example. Change the docker systemd service to add a tcp socket : /usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2375 --containerd=/run/containerd/containerd.sock Reload systemd + restart Write a Dockerfile: FROM alpine
COPY w.sh w.sh
CMD ["./w.sh"] And a while/sleep loop #!/bin/sh
while true; do sleep 2 ; echo "foreground"; done Build image: docker build . -t persist Start container docker run -itd persist And on a remote machine: docker -H tcp://the-url-or-ip exec -ti 25686e95ce26e9c4d8e2e38ea5d9cfe3332a61820a31fd9007b039b41c3bb358 /bin/sh It means that for this issue, we need a correct dockerd setup + a line in the build report page "you can connect to the docker container like this" (or in the logs). |
so, you want to make a docker daemon available from public, right? |
No, this feature is for sysadmin running the whole thing. I wanted simply to report in sparky ui something like « you can connect inside your docker container with: docker -H tcp:// etc... » (Plus eventually a « pause » feature) |
I know we can, at least with docker (something like
docker -H tcp://thenodewhereitisexecuted exec -ti thelayerhash /bin/bash
) but do we have the info somewhere (in the logs or better in the running build ("report") page ?Extra bonus : It could go with a "pause" feature for short living jobs (I'm greedy sorry)
The text was updated successfully, but these errors were encountered: