
关于本机

:在安装Docker的过程中,经历了许多失败,这款MacBook Pro可以算是废品,不能正常安装Docker,安装完成后打开会提示CPU不兼容。Incompatible CPU detectedWe are sorry, but your hardware is incompatible with Docker Desktop.Docker requires a processor with virtualization capabilities and hypervisor support.

If you experience any issues after upgrading your macOS to version 10.15, you must install the latest version of Docker Desktop to be compatible with this version of macOS.):


# Github docker-machinehttps://github.com/docker/machine/releases# 网站提示方法$ curl -L https://github.com/docker/machine/releases/download/v0.16.2/docker-machine-`uname -s`-`uname -m` >/usr/local/bin/docker-machine && \chmod +x usr/local/bin/docker-machine


VBoxManage 6.1.32r149290docker-machine version 0.16.2, build bd45ab13
docker-machine create -d virtualbox default
boot2docker.iso
# Github boot2docker.isohttps://github.com/boot2docker/boot2docker/releases# 文件夹/Users/mac/.docker/machine/cache
network# 这个问题是由较新版本的VirtualBox中Host-Only网络的IP限制引起的
Running pre-create checks...Creating machine...(default) Copying Users/foobar/.docker/machine/cache/boot2docker.iso to Users/foobar/.docker/machine/machines/default/boot2docker.iso...(default) Creating VirtualBox VM...(default) Creating SSH key...(default) Starting the VM...(default) Check network to re-create if needed...(default) Found a new host-only adapter: "vboxnet0"Error creating machine: Error in driver during machine creation: Error setting up host only network on machine start: usr/local/bin/VBoxManage hostonlyif ipconfig vboxnet0 --ip 192.168.99.1 --netmask 255.255.255.0 failed:VBoxManage: error: Code E_ACCESSDENIED (0x80070005) - Access denied (extended info not available)VBoxManage: error: Context: "EnableStaticIPConfig(Bstr(pszIp).raw(), Bstr(pszNetmask).raw())" at line 242 of file VBoxManageHostonly.cpp
# 来源文章:# docker-machine无法在macOS上创建计算机,VBoxManage返回E_ACCESSDENIED错误https://www.5axxw.com/questions/content/hjmf2d
* 0.0.0.0/0 ::/0

五、解决完这两个错误之后,开始使用SSH进入创建的机器中
# 使用docker-machinedocker-machine ssh <machineName># 使用第三方ssh连接工具,(FinalShell)
1. 使用密码连接:
# 进入机器docker-machine ssh <machineName># 使用root用户权限sudo su# 修改root密码passwd root# 按照提示输入
错误:使用密码连接不能成功,docker-machine使用的是ssh(rsa)免密登录
2. 修改登录方式,使用ssh(rsa)登录
/Users/mac/.docker/machine/machines/<machineName>/id_rsa


连接成功后,就可以使用
1. 在Github获取文件
# Github docker-composehttps://github.com/docker/compose/releases# https://github.com/docker/compose/releases/download/v2.3.3/docker-compose-linux-x86_64# 将下载后的文件重命名为docker-compose# 再放入文件夹下/usr/local/bin/# 然后添加执行权限chmod +x usr/local/bin/docker-compose# 查看docker-compose版本docker-compose -vDocker Compose version v2.3.3
出现小插曲



2. 部署容器
# docker-compose.yaml# ownCloud with MariaDB/MySQL## Access via "http://localhost:8080" (or "http://$(docker-machine ip):8080" if using docker-machine)## During initial ownCloud setup, select "Storage & database" --> "Configure the database" --> "MySQL/MariaDB"# Database user: root# Database password: example# Database name: pick any name# Database host: replace "localhost" with "mysql"version: '3.1'services:owncloud:image: owncloudrestart: alwaysports:- 8080:80mysql:image: mariadbrestart: alwaysenvironment:MYSQL_ROOT_PASSWORD: example
现在,这款老机器就能正常使用Docker了。
文章转载自络鸣泪 笛归,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




