先给一个实际运行展示, 妈妈再也不用担心我在配置文件里找半天了 😃
admin@ubuntuyyy:~$ cc
? 确认关闭docker? Yes
INFO 正在关闭docker
0 Warning: Stopping docker.service, but it can still be activated by:
docker.socket
? 请输入需要修改的容器名: python
请根据提示重新输入所有的端口映射
? Please input host port, empty to exit 23
? Please input container port, empty to exit 22
? Please input host port, empty to exit
host port 23 : container port 22
? 再次确认? Yes
INFO | finished
docker已重启, 请手动启动容器
step1 install pipx
By default, ubuntu doesn’t have a way to install pipx using pip, so we have to:
运行下面命令就完了
sudo apt-get update && sudo apt-get install pipx && pipx ensurepath
After that we need to shut down the terminal and reenter it (or just reboot)
关机重启
step2 install container-cli
pipx install container-cli
使用
命令行输入cc, 回车, 完事
Type cc or container-cli on the command line to start, and follow the prompts.