-
Notifications
You must be signed in to change notification settings - Fork 160
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
feat: Support SSH #43
Conversation
cmd/midi/build.go
Outdated
@@ -112,6 +112,10 @@ func actionBuild(clicontext *cli.Context) error { | |||
}, | |||
}, | |||
}, | |||
LocalDirs: map[string]string{ | |||
// TODO: how to properly select build context? | |||
"context": "/home/ubuntu/workspace/MIDI/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How to properly specify context now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could use the current dir as the build context?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally LGTM
cmd/midi/build.go
Outdated
@@ -112,6 +112,10 @@ func actionBuild(clicontext *cli.Context) error { | |||
}, | |||
}, | |||
}, | |||
LocalDirs: map[string]string{ | |||
// TODO: how to properly select build context? | |||
"context": "/home/ubuntu/workspace/MIDI/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could use the current dir as the build context?
func (g Graph) copyMidiSSHServer(root llb.State) llb.State { | ||
run := root.File(llb.Mkdir("/var/midi/remote/", 0700, llb.WithParents(true))). | ||
File(llb.Mkdir("/var/midi/bin/", 0700, llb.WithParents(true))). | ||
File(llb.Copy(llb.Local("context"), "examples/ssh_keypairs/public.pub", "/var/midi/remote/authorized_keys")). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can open an issue to keep track of this hard-coded key.
Please rebase the main branch |
Ref #16
Copy the midi-ssh into the container.
Found that the username used to ssh doesn't matter (i.e. ssh ubuntu@xxxx and ssh root@xxx both works)
TODO: