I'm trying to use a host folder inside the container but I couldn't. The documentations available are mostly for SDK. I would like to do this on my bash script. How to accomplish this?
#!/bin/bash
tag=`jq .tag input.json`
hostdir="/tmp"
alpine=$(dagger query <<EOF | jq -r .container.from.withDirectory.withWorkdir.withExec.stdout
{
container {
from(address:"alpine:latest") {
withDirectory(path:"/src", directory:"$hostdir") {
withWorkdir(path:".") {
withExec(args:["sh", "-c",
"""
echo tag version is $tag
ls -ltr /src
uname -a
"""
]) {
stdout
}
}
}}
}
}
EOF
)
echo $alpine