Hey everybody; I'm having a hard time groking how directories work here; I have the following pipeline, and can't figure out how to get the built assets back out of the container (they should end up in /src/build in the container)
import { connect, Client } from "@dagger.io/dagger"
import { isMethodSignature } from "typescript"
// initialize Dagger client
connect(
async (client: Client) => {
let repo = client.git("https://github.com/evidence-dev/template", {keepGitDir: false,}).branch("next").tree()
const buildSh = `
cd /src
npm i
npm run build:sources
npm run build
`
const contents = await client
.container()
.from("node:20")
.withMountedDirectory("/src", repo)
.withWorkdir("/src")
.withNewFile("/src/build.sh", {contents: buildSh})
.withExec(["bash", "/src/build.sh"])
console.log(await contents.stdout())
},
{ LogOutput: process.stderr }
)