Kermit
Kermit

Reputation: 6022

Start docker from command line

Is there a command for starting docker from the command line? While this works, it is quite lame:

$ open /Applications/Docker.app/

$ docker returns help text about docker cli commands.

Upvotes: 1

Views: 250

Answers (2)

Kermit
Kermit

Reputation: 6022

Ended up adding these alias to ~/.bash_profile or ~/.zshrc.

alias dock="open -a 'Docker'"
alias dock_start="open -a 'Docker'"
alias docker_start="open -a 'Docker'"

Upvotes: 0

Adrian
Adrian

Reputation: 177

An alternative could be setting up an alias and place it inside ~/.bashrc

echo -e "\nopen-docker='open /Applications/Docker.app/'" >> ~/.bashrc

Upvotes: 1

Related Questions