Skip to content

Commit

Permalink
feat: envd-sshd can read public key path from environment variable (#954
Browse files Browse the repository at this point in the history
)

add

Signed-off-by: Jinjing.Zhou <allenzhou@tensorchord.ai>

Signed-off-by: Jinjing.Zhou <allenzhou@tensorchord.ai>
  • Loading branch information
VoVAllen committed Sep 30, 2022
1 parent 7c41dde commit 006f653
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions cmd/envd-sshd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func main() {
Name: flagAuthKey,
Usage: "path to authorized keys file, defaults to " + config.ContainerAuthorizedKeysPath,
Value: config.ContainerAuthorizedKeysPath,
EnvVars: []string{"ENVD_AUTHORIZED_KEYS_PATH"},
Aliases: []string{"a"},
},
&cli.BoolFlag{
Expand Down
3 changes: 1 addition & 2 deletions pkg/lang/ir/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func (g Graph) GetEntrypoint(buildContextDir string) ([]string, error) {
}

template := `set -euo pipefail
/var/envd/bin/envd-sshd --authorized-keys %s --port %d --shell %s &
/var/envd/bin/envd-sshd --port %d --shell %s &
%s
wait -n`

Expand All @@ -235,7 +235,6 @@ wait -n`
}

cmd := fmt.Sprintf(template,
config.ContainerAuthorizedKeysPath,
config.SSHPortInContainer, g.Shell, customCmd.String())
ep = append(ep, cmd)

Expand Down

0 comments on commit 006f653

Please sign in to comment.