Установите Docker через Vagrantfile - PullRequest
0 голосов
/ 25 сентября 2018

В соответствии с этим:

https://www.vagrantup.com/docs/provisioning/docker.html

Поставщик Vagrant Docker может автоматически устанавливать Docker, извлекать контейнеры Docker и настраивать определенные контейнеры для запуска при загрузке.

однако я не вижу никаких инструкций о том, как сделать это на этой странице.

Я пробовал этот Vagrantfile:

Vagrant.configure('2') do |config|
    config.vm.box = "hashicorp/precise64"
    config.vm.define "vm1"
    config.vm.provision "docker" do |d|
      d.build_image "/vagrant/app"
    end
end

, который встречается в

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

curl -sSL https://get.docker.com/ | sh

Stdout from the command:

# Executing docker install script, commit: 36b78b2


Stderr from the command:

+ sh -c echo "deb http://ftp.debian.org/debian wheezy-backports main" >> /etc/apt/sources.list
+ sh -c apt-get update -qq >/dev/null
W: GPG error: http://ftp.debian.org wheezy-backports Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010
+ sh -c apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
dpkg-preconfigure: unable to re-open stdin: No such file or directory

А этот (из https://www.vagrantup.com/docs/provisioning/docker.html):

Vagrant.configure("2") do |config|
  config.vm.provision "docker" do |d|
    d.build_image "/vagrant/app"
  end
end

встречается:

vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:

vm:
* A box must be specified.

Я думаю, что основные вопросы:

  1. почему официальные документы (https://www.vagrantup.com/docs/provisioning/docker.html) не работают?

и 2. как я полагаю, вам нужно указать поле, почему я получаю это, когда я задаю поле?

W: GPG error: http://ftp.debian.org wheezy-backports Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010
+ sh -c apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
dpkg-preconfigure: unable to re-open stdin: No such file or directory

Есть предложения?

...