exec - shell functions ?
Hi guys. How do you 'exec' your container shell functions without going into shell interactively? many thanks, L.
On Sun, Jun 18, 2023 at 10:59 AM lejeczek via Podman <podman@lists.podman.io> wrote:
Hi guys.
How do you 'exec' your container shell functions without going into shell interactively?
You can run, for instance, `podman exec $container -s "$functions"`.
many thanks, L. _______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
On 19/06/2023 07:55, Valentin Rothberg wrote:
On Sun, Jun 18, 2023 at 10:59 AM lejeczek via Podman <podman@lists.podman.io> wrote:
Hi guys.
How do you 'exec' your container shell functions without going into shell interactively?
You can run, for instance, `podman exec $container -s "$functions"`.
I was looking at a few websites which suggest docker exec this way: -> $ docker exec 123456789abc bash -c "{command 1} ; {command 2}" which does not work, but this does, with/in podman: -> $ podman container exec freeipa.mine.priv bash -c "source /root/.bashrc; __ipaCollectBits" thanks, L.
On 6/18/23 10:57, lejeczek via Podman wrote:
Hi guys.
How do you 'exec' your container shell functions without going into shell interactively?
many thanks, L.
_______________________________________________ Podman mailing list --podman@lists.podman.io To unsubscribe send an email topodman-leave@lists.podman.io
I am not sure what you mean. podman run ubi9 echo hi Will execute the `sh -c "echo hi"` without going interactive.
On 19/06/2023 11:21, Daniel Walsh wrote:
On 6/18/23 10:57, lejeczek via Podman wrote:
Hi guys.
How do you 'exec' your container shell functions without going into shell interactively?
many thanks, L.
Apologies as perhaps I did not make it clear - user shell function I meant As in my last message, I can exec those now, I was a bit naive/lazy thinking that just giving function-name as an arg to the 'podman' will do, say: .. exec my-cont my-shell-function(declared in container user rc/profile) But it works - as I shared in my last message - so it's good, many! thanks. L.
participants (3)
-
Daniel Walsh -
lejeczek -
Valentin Rothberg