summaryrefslogtreecommitdiff
path: root/op-mode-definitions
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-08-23 21:04:59 +0200
committerChristian Poessinger <christian@poessinger.com>2021-08-23 21:07:14 +0200
commitf3ff81f4f31cd3ecb5d648caff674663943db42f (patch)
tree7ca6e22a50a6891190c58de4e844504a6888b43f /op-mode-definitions
parent209ce3d9b6fb09626a7abe3540b888566b739de8 (diff)
downloadvyos-1x-f3ff81f4f31cd3ecb5d648caff674663943db42f.tar.gz
vyos-1x-f3ff81f4f31cd3ecb5d648caff674663943db42f.zip
container: op-mode: T3765: "connect container" will now drop you to a shell
Commit a30d74f4 (container: op-mode: T3765: add "connect container mysql-server") added a CLI op-mode command to attach to a container - users typically not want to attach and consume stdout (can be done via logs) but rather wan't to debug inside the container image. vyos@vyos:~$ connect container unifi USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 202 0.0 0.0 4640 828 pts/1 Ss 21:06 0:00 /bin/sh root 203 0.0 0.0 34416 2872 pts/1 R+ 21:06 0:00 \_ ps faux root 187 0.0 0.0 18388 3124 ? S 21:03 0:00 /bin/bash root 186 0.0 0.0 4640 788 ? S 21:03 0:00 /bin/sh root 185 0.0 0.0 4640 824 ? S 21:03 0:00 /bin/sh root 184 0.0 0.0 4640 836 ? S 21:03 0:00 /bin/sh root 1 0.0 0.0 18520 3228 pts/0 Ss+ 20:50 0:00 bash /usr/local/bin/docker-entrypoint.sh unifi root 12 4.8 14.2 3688080 572756 pts/0 Sl+ 20:50 0:48 java -Dunifi.datadir=/unifi/data -Dunifi.logdir=/unifi/log -Dunifi.rundir=/var/run/unifi - root 35 0.7 3.4 1102700 139752 pts/0 Sl+ 20:50 0:07 \_ bin/mongod --dbpath /usr/lib/unifi/data/db --port 27117 --unixSocketPrefix /usr/lib/un Linux 57c689f739ed 5.10.60-amd64-vyos #1 SMP Fri Aug 20 14:44:59 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Diffstat (limited to 'op-mode-definitions')
-rw-r--r--op-mode-definitions/containers.xml.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/op-mode-definitions/containers.xml.in b/op-mode-definitions/containers.xml.in
index efa72e1a4..b2b318786 100644
--- a/op-mode-definitions/containers.xml.in
+++ b/op-mode-definitions/containers.xml.in
@@ -26,7 +26,7 @@
<path>container name</path>
</completionHelp>
</properties>
- <command>echo "Use Ctrl+p and Ctrl+q to detach"; sudo podman attach "$3"</command>
+ <command>sudo podman exec --interactive --tty "$3" /bin/sh</command>
</tagNode>
</children>
</node>