Last active
March 17, 2021 04:45
-
-
Save arreusch/85d25478839d0964aa2e4e44fb8be273 to your computer and use it in GitHub Desktop.
Get a serial console to linux host for docker on mac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TTY_TMP=$(mktemp) | |
$(socat -d -d ~/Library/Containers/com.docker.docker/Data/debug-shell.sock pty,rawer 2>&1 | grep -Eo --line-buffered "/dev/tty\w+" > ${TTY_TMP} ) & | |
sleep 2 | |
TTY=$(tail -n 1 "${TTY_TMP}") | |
picocom $TTY 2>/dev/null |
I'm glad it was of some use it's derived from another persons post although I can't recall the original thread.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You saved the day, thanks for the script! For the record some tools needs to be installed first (if not done yet),