hey sorry this took so long. back at the other end.
so i tried migrating everything to pure dagger; i'm still running into issues forwarding the auth socket to the container. the solution linked works for git repositories (when you are pulling a private repo and mounting it as a directory), but i'm trying to install a private dependency. here's a snippet of what i'm doing:
// ssh socket
const sshAuthSockPath = process.env.SSH_AUTH_SOCK?.toString() || '';
const socket = client.host().unixSocket(sshAuthSockPath);
let container = client
.container()
.withRegistryAuth(registry, userName, password)
.from(rustBase)
.withUnixSocket(sshAuthSockPath, socket)
.withWorkdir("/app")
.withFile("/app/Cargo.toml", client.host().file(cargoPath))
.withFile("/app/.env", client.host().file(envPath))
.withServiceBinding(dbHost, dbContainer)
.withDirectory("/app/src", client.host().directory(srcFolder))
.withDirectory(
"/app/testing",
client
.host()
.directory(testingFolder)
.withoutDirectory("node_modules")
)
.withExec("bash", "-c", "npm install")
^ the above fails because it can't find the private dependency (it doesn't have access). passing the ssh key to the container and then setting it up manually, or copying node modules, does work but i was kinda hoping to avoid that, and copying dependencies like node modules isn't possible in all languages (like rust)