Installations Of Docker & Oh My Zsh On MacOS

Installation Of Docker

To install docker, run the command as below.

1
2
brew install --cask docker
#then enjoy it

Installation of Oh My Zsh

Mirror source of Gitee

1
sh -c "$(curl -fsSL https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh)"

Source of Github

1
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Configuration Of Auto-Completion

  1. Create a dictory for Auto-Completion and pull the files from remote server.
1
2
3
4
5
6
7
8
#create a dictory
mkdir -p ~/.zsh/completion

#zsh-completions
git clone https://github.com/zsh-users/zsh-completions ~/.oh-my-zsh/custom/plugins/zsh-completions

#completions of docker
curl -L https://raw.staticdn.net/docker/compose/1.27.4/contrib/completion/zsh/_docker-compose > ~/.zsh/completion/_docker-compose
  1. Copy files of Docker.app to ~/.zsh/completion
1
2
3
4
5
6
7
#Copy Docker.app to  ~/.zsh/completion
cp /Applications/Docker.app/Contents/Resources/etc/docker.zsh-completion ~/.zsh/completion/_docker
cp /Applications/Docker.app/Contents/Resources/etc/docker-compose.zsh-completion ~/.zsh/completion/_docker-compose
cp /Applications/Docker.app/Contents/Resources/etc/docker-machine.zsh-completion ~/.zsh/completion/_docker-machine


vim ~/.zshrc
  1. Put those below content into .zshrc file.
1
2
3
4
5
#put those below into .zshrc
plugins=(git zsh-completions docker docker-compose)

fpath=(~/.zsh/completion $fpath)
autoload -Uz compinit && compinit -i

Logs for reference.

Logs Of Teminal

  1. Reload ~/.zshrc to make it into effect.
1
2
3
4
#execute this
autoload -U compinit && compinit
#then reload .zshrc
source ~/.zshrc

Installations Of Docker & Oh My Zsh On MacOS
https://iceswear.github.io/2022/11/05/InstallationsOfDockerAndOhMyZshOnMacOS/
Author
Spike Wong
Posted on
November 5, 2022
Licensed under