第 10.1 節
Quickly Open a Terminal in Docker
0瀏覽次數0訪問次數--跳出率--平均停留
Goal: Be able to enter a command in my local terminal to quickly access the terminal of a specific Docker container.
You can first open the VScode extensions panel to check what images you have.

For example, my ros_jazzy_opencv_cuda and ros_opencv_cuda are the jazzy and humble images, respectively.
Then edit ~/.bashrc, adding at the end
# Docker快速进入终端命令
alias djazzy='docker exec -it ros_jazzy_opencv_cuda bash'
alias dhumble='docker exec -it ros_opencv_cuda bash'
Open a new terminal, then type djazzy to enter the Jazzy terminal.
