You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cmd-podman-build: support --args for just printing arguments
In the case where you are running COSA via the alias/func [1] and not
in a custom toolbox container then `cosa podman-build node` today
won't work because running `podman` inside a rootless container
doesn't really work.
Add a new `--args` argument here to just tell `cosa podman-build`
to set up for the build (i.e. generate tmp files and necessary
arguments) and then print what would have been passed to `podman build`.
This can then be used on the host to run `podman build` with something
like:
```
node-build() {
local args=$(cosa podman-build --args node)
# Translate src/config to the location of the repo on disk. Also
# tr to remove the trailing `\r` from the output.
args=$(echo "$args" | tr -d '\r' | sed s,src/config,$COREOS_ASSEMBLER_CONFIG_GIT,g)
set -x
podman build $args
set +x
}
```
So you'd run `node-build` and it would do what you need for you.
[1] https://github.com/coreos/coreos-assembler/blob/main/docs/building-fcos.md#define-a-bash-alias-to-run-cosa
0 commit comments