我尝试添加以下内容
export CLI='docker run -it --entrypoint cardano-cli -e NETWORK=testnet -e CARDANO_NODE_SOCKET_PATH=/ipc/node.socket -v cardano-node-ipc-testnet:/ipc inputoutput/cardano-node'
deano@Ds-MacBook-Pro ~ % sudo vi ~/.zshrc
deano@Ds-MacBook-Pro ~ % source ~/.zshrc
deano@Ds-MacBook-Pro ~ % CLI
zsh: command not found: CLI
如何将 CLI 添加为自定义 docker run -it 的命令
答案1
使用别名
sudo vi ~/.zshrc
alias CLI="docker run -it --entrypoint cardano-cli -e NETWORK=testnet -e CARDANO_NODE_SOCKET_PATH=/ipc/node.socket -v cardano-node-ipc-testnet:/ipc inputoutput/cardano-node"
source ~/.zshrc