如何降级docker-machine和boot2docker使用的docker版本? [英] How to downgrade version of docker used by docker-machine and boot2docker?

查看:205
本文介绍了如何降级docker-machine和boot2docker使用的docker版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在OS:X上使用docker-machine。我想将Docker 1.11.2安装到我的boot2docker机器上,但是看起来docker-machine和boot2docker的组合总是 boot2docker

I am using docker-machine on OS:X. I would like to install Docker 1.11.2 into my boot2docker machine, however it looks like the combination of docker-machine and boot2docker are always pulling the latest release of boot2docker.

我尝试替换〜/ .docker /机器/机器/默认/boot2docker.iso ,其手动下载的iso匹配1.11.2,但这似乎并没有真正改变码头工人的版本。

I have tried replacing ~/.docker/machine/machines/default/boot2docker.iso with a manually downloaded iso matching 1.11.2, however this doesn't seem to actually change the version of docker.

我没有看到 docker-machine文档中列出的任何内容可以指定在创建虚拟机时使用哪个iso或docker版本。我正在使用VirtualBox作为驱动程序。

I do not see anything listed in docker-machine documentation which suggests it to be possible to specify which iso or version of docker to use when creating the virtualmachine. I am using VirtualBox as driver.

我该如何降级安装在虚拟机中的docker版本或创建一个安装了特定版本的新Docker?

How can I either downgrade the version of docker installed in my virtual machine or create a new one with a specific version installed?

推荐答案

在创建新计算机时,可以指定从何处使用-virtualbox获取boot2docker ISO -boot2docker-url 选项。这样做会避免将计算机升级到最新版本。

When creating a new machine it is possible to specify where to get the boot2docker ISO from using the --virtualbox-boot2docker-url option. When doing that it will refrain from upgrading the machine to the latest version.

示例:

docker-machine create \
  --driver virtualbox \
  --virtualbox-memory 6144 \
  --virtualbox-hostonly-cidr "10.10.10.1/24" \
  --virtualbox-cpu-count "2" \
  --virtualbox-disk-size "20000" \
  --virtualbox-boot2docker-url https://github.com/boot2docker/boot2docker/releases/download/v1.12.2/boot2docker.iso \
  default

这篇关于如何降级docker-machine和boot2docker使用的docker版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆