Expand user home dir in client filesystem

Signed-off-by: Helder Correia <174525+helderco@users.noreply.github.com>
This commit is contained in:
Helder Correia
2022-03-25 11:50:47 -01:00
parent 2c137210a2
commit 770acd3ce2
5 changed files with 20 additions and 15 deletions

View File

@@ -8,8 +8,8 @@ import (
dagger.#Plan & {
client: filesystem: {
"/home/user/.ssh/id_rsa": read: contents: dagger.#Secret
"/home/user/.ssh/known_hosts": read: contents: dagger.#Secret
"~/.ssh/id_rsa": read: contents: dagger.#Secret
"~/.ssh/known_hosts": read: contents: dagger.#Secret
}
actions: {
@@ -22,8 +22,8 @@ dagger.#Plan & {
tag: "myimage:v2"
host: "ssh://root@93.184.216.34"
ssh: {
key: client.filesystem."/home/user/.ssh/id_rsa".read.contents
knownHosts: client.filesystem."/home/user/.ssh/known_hosts".read.contents
key: client.filesystem."~/.ssh/id_rsa".read.contents
knownHosts: client.filesystem."~/.ssh/known_hosts".read.contents
}
}
}

View File

@@ -7,15 +7,15 @@ import (
dagger.#Plan & {
client: filesystem: {
"/home/user/.ssh/id_rsa": read: contents: dagger.#Secret
"/home/user/.ssh/known_hosts": read: contents: dagger.#Secret
"~/.ssh/id_rsa": read: contents: dagger.#Secret
"~/.ssh/known_hosts": read: contents: dagger.#Secret
}
actions: run: cli.#Run & {
host: "ssh://root@93.184.216.34"
ssh: {
key: client.filesystem."/home/user/.ssh/id_rsa".read.contents
knownHosts: client.filesystem."/home/user/.ssh/known_hosts".read.contents
key: client.filesystem."~/.ssh/id_rsa".read.contents
knownHosts: client.filesystem."~/.ssh/known_hosts".read.contents
}
command: name: "info"
}