Академический Документы
Профессиональный Документы
Культура Документы
macOSusersuseDockerToolboxtoinstallDockersoftware.DockerToolboxincludesthe
followingDockertools:
DockerCLIclientforrunningDockerEnginetocreateimagesandcontainers
DockerMachinesoyoucanrunDockerEnginecommandsfrommacOSterminals
DockerComposeforrunningthedocker-composecommand
Kitematic,theDockerGUI
theDockerQuickStartshellpreconfiguredforaDockercommand-lineenvironment
OracleVMVirtualBox
BecausetheDockerEnginedaemonusesLinux-specifickernelfeatures,youcantrunDocker
EnginenativelyinmacOS.Instead,youmustusetheDockerMachinecommand,dockermachine,tocreateandattachtoasmallLinuxVMonyourmachine.ThisVMhostsDocker
EngineforyouonyourMac.
YourMacmustberunningmacOS10.8MountainLionornewertorunDockersoftware.To
findoutwhatversionoftheOSyouhave:
1.ChooseAboutthisMacfromtheApplemenu.
TheversionnumberappearsdirectlybelowthewordsmacOS.
2.Ifyouhavethecorrectversion,gotothenextstep.
Ifyouarentusingasupportedversion,youcouldconsiderupgradingyouroperating
system.
IfyouhavemacOS10.10.3Yosemiteornewer,considerusingDockerforMac
(https://docs.docker.com/docker-for-mac/)instead.ItrunsnativelyontheMac,sothereis
noneedforapre-configuredDockerQuickStartshell.Itusesxhyveforvirtualization,
insteadofVirutalBox.FullinstallprerequisitesareprovidedintheDockerforMactopicin
DockerforMac(https://docs.docker.com/docker-for-mac/#what-to-know-before-youinstall).
1.InstallDockerToolboxbydouble-clickingthepackageorbyright-clickingandchoosing
Openfromthepop-upmenu.
Theinstallerlaunchesanintroductorydialog,followedbyanoverviewofwhatsinstalled.
2.PressContinuetoinstallthetoolbox.
Theinstallerpresentsyouwithoptionstocustomizethestandardinstallation.
Bydefault,thestandardDockerToolboxinstallation:
installsbinariesfortheDockertoolsin/usr/local/bin
makesthesebinariesavailabletoallusers
updatesanyexistingVirtualBoxinstallation
Fornow,dontchangeanyofthedefaults.
3.PressInstalltoperformthestandardinstallation.
Thesystempromptsyouforyourpassword.
4.Provideyourpasswordtocontinuewiththeinstallation.
Whenitcompletes,theinstallerprovidesyouwithsomeshortcuts.Youcanignorethisfor
nowandclickContinue.
ThenclickClosetofinishtheinstaller.
TorunaDockercontainer,you:
createanew(orstartanexisting)DockerEnginehostrunning
switchyourenvironmenttoyournewVM
usethedockerclienttocreate,load,andmanagecontainers
Onceyoucreateamachine,youcanreuseitasoftenasyoulike.LikeanyVirtualBoxVM,it
maintainsitsconfigurationbetweenuses.
1.OpentheLaunchpadandlocatetheDockerQuickstartTerminalicon.
2.ClicktheicontolaunchaDockerQuickstartTerminalwindow.
TheterminaldoesanumberofthingstosetupDockerQuickstartTerminalforyou.
3.Clickyourmouseintheterminalwindowtomakeitactive.
Ifyouarentfamiliarwithaterminalwindow,herearesomequicktips.
Thepromptistraditionallya$dollarsign.Youtypecommandsintothecommandline
whichistheareaaftertheprompt.Yourcursorisindicatedbyahighlightedareaora|that
appearsinthecommandline.Aftertypingacommand,alwayspressRETURN.
4.Typethedocker run hello-worldcommandandpressRETURN.
Thecommanddoessomeworkforyou,ifeverythingrunswell,thecommandsoutput
lookslikethis:
RemovingToolboxinvolvesremovingalltheDockercomponentsitincludes.
AfulluninstallalsoincludesremovingthelocalandremotemachinesyoucreatedwithDocker
Machine.Insomecases,youmightwanttokeepmachinescreatedwithDockerMachine.
Forexample,ifyouplantore-installDockerMachineasapartofDockerforMacyoucan
continuetomanagethosemachinesthroughDocker.Or,ifyouhaveremotemachinesona
cloudproviderandyouplantomanagethemusingtheprovider,youwouldntwantto
removethem.Sothesteptoremovemachinesisdescribedhereasoptional.
TouninstallToolboxonaMac,dothefollowing:
1.Listyourmachines.
$ docker-machine ls
NAME
ACTIVE
SWARM
dev
*
my-docker-machine
default
DRIVER
STATE
URL
virtualbox
virtualbox
virtualbox
Running
Stopped
Stopped
tcp://192.168.99.100:2376
2.Optionally,removeeachmachine.Forexample:
$ docker-machine rm my-docker-machine
Successfully removed my-docker-machine
3.RemovetheDockerQuickstartTerminalandKitematicfromyourApplicationsfolder.
4.Removethedocker,docker-compose,anddocker-machinecommandsfromthe
/usr/local/binfolder.
$ rm /usr/local/bin/docker
$ rm /usr/local/bin/docker-compose
$ rm /usr/local/bin/docker-machine
Feedback?Suggestions?Can'tfindsomethinginthedocs?
Editthispage
(https://github.com/docker/docker.github.io/edit/master/toolbox/toolbox_install_mac.md)
Requestdocschanges(https://github.com/docker/docker.github.io/issues/new?title=Feedback
for:toolbox/toolbox_install_mac.md&assignee=londoncalling&body=File:
[toolbox/toolbox_install_mac.md](https://docs.docker.com/toolbox/toolbox_install_mac/))
Getsupport(https://www.docker.com/docker-support-services)
Ratethispage: 2 2
Connect