Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install docker in Mac

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how to install docker in Mac" related knowledge, editor through the actual case to show you the operation process, the method of operation is simple and fast, practical, I hope that this "how to install docker in Mac" article can help you solve the problem.

1. Install docker toolbox,virtualbox# brew cask install virtualbox# brew cask install docker-toolbox2 and register Ali docker Accelerator

This step is not necessary, but I think it is still necessary to do it. The server is abroad, you know.

3, create an image

Docker-machine create-- engine-registry-mirror= https://aurtqjzl.mirror.aliyuncs.com-d virtualbox default

The command also generates a configuration file for docker machine in the ~ / .docker/machine/machines/default directory. You only need to execute the create command once. You can then use the docker-machine command to start, stop, query, and manage the virtual machine.

If not added at the time of creation, the accelerator. You can do the following

$docker-machine ssh default / / ssh to default$ cat / var/lib/boot2docker/profileEXTRA_ARGS='--label provider=virtualbox--registry-mirror https://aurtqjzl.mirror.aliyuncs.com / / add 'CACERT=/var/lib/boot2docker/ca.pemDOCKER_HOST='-H tcp://0.0.0.0:2376'DOCKER_STORAGE=aufsDOCKER_TLS=autoSERVERKEY=/var/lib/boot2docker/server-key.pemSERVERCERT=/var/lib/boot2docker/server.pem4 The environment variable $docker-machine env default / / default of default is the name export DOCKER_TLS_VERIFY= "1" export DOCKER_HOST= "tcp://192.168.99.100:2376" export DOCKER_CERT_PATH= "/ Users/zhangying/.docker/machine/machines/default" export DOCKER_MACHINE_NAME= "default" # Run this command to configure your shell:# eval "$(docker-machine env default)" 5 created above. Activate default# eval "$(docker-machine env default)" zhangyingdeMacBook-Pro:machines zhangying$ docker-machine lsNAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORSdefault * virtualbox Running tcp://192.168.99.100:2376 v17.05.0-cemytest-virtualbox Stopped Unknown

A * sign indicates activation.

6. Start centos$ docker run-it centos

It will prompt you that you don't have centos, and then you will download it.

This is the end of the introduction on "how to install docker in Mac". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report