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
When trying to pipe data into commands executed in containers using kamal exec, no data is recieved.
Use Case:
I am trying to restore a database backup via the following command from my dev machine: kamal accessory exec -i --reuse mysql 'mysql example_db"' < example_db_backup.sql (ignoring password handling for this example)
Kamal translates this to: ssh -t example_host docker exec -it example_project-mysql 'mysql example_db' < example_db_backup.sql
However, to make piping through docker work, -i has to be set, but not -t.
Proposed Solution:
I suggest that besides the --interactive/-i flag, a --tty/-t flag is added to control both independently.
Alternative Solution:
Kamal could also check if STDIN is attached to a file/pipe when interactive is enabled and set -i instead of -ti in this case.
If one of those solutions sound acceptable, I am happy to write a PR.
The text was updated successfully, but these errors were encountered:
When trying to pipe data into commands executed in containers using
kamal exec
, no data is recieved.Use Case:
I am trying to restore a database backup via the following command from my dev machine:
kamal accessory exec -i --reuse mysql 'mysql example_db"' < example_db_backup.sql
(ignoring password handling for this example)
Kamal translates this to:
ssh -t example_host docker exec -it example_project-mysql 'mysql example_db' < example_db_backup.sql
However, to make piping through docker work,
-i
has to be set, but not-t
.Proposed Solution:
I suggest that besides the
--interactive
/-i
flag, a--tty
/-t
flag is added to control both independently.Alternative Solution:
Kamal could also check if STDIN is attached to a file/pipe when interactive is enabled and set
-i
instead of-ti
in this case.If one of those solutions sound acceptable, I am happy to write a PR.
The text was updated successfully, but these errors were encountered: