在linux docker容器中安装windows虚拟机



我已经试着遵循这篇文章:

https://medium.com/axon-technologies/installing-a-windows-virtual-machine-in-a-linux-docker-container-c78e4c3f9ba1

Dockerfile可以在文章的底部找到

当我这样做时,我得到以下错误:

首先,我有一个关于设置TZ的问题,所以我添加了this:

ENV TZ=Europe/Stockholm RUN ln -snf/user/share/userinfo/$TZ

运行ln -snf/etc/localtime &&echo $TZ>/etc/timezone

然后我得到了一个错误,关于vagrant的安装不是一个debian存档文件,所以我把它改成了:

RUN wget https://releases.hashicorp.com/vagrant/2.3.4/vagrant_2.3.4-1_amd64.deb
-O vagrant_2.3.4-1_amd64.deb 
RUN dpkg -i vagrant_2.3.4-1_amd64.deb

现在我得到了以下错误,我不知道如何解决:

==> default: You are trying to forward to privileged ports (ports <= 1024). Most
==> default: operating systems restrict this to only privileged process (typically
==> default: processes running as an administrative user). This is a warning in case
==> default: the port forwarding doesn't work. If any problems occur, please try a
==> default: port higher than 1024.
==> default: Forwarding ports...
==> default: 3389 (guest) => 3389 (host) (adapter eth0)
Traceback (most recent call last):
      89: from /opt/vagrant/embedded/gems/2.3.4/gems/logging-2.3.1/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
      88: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/batch_action.rb:86:in `block (2 levels) in run'
      87: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/machine.rb:203:in `action'
      86: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/machine.rb:203:in `call'
      85: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/environment.rb:631:in `lock'
      84: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/machine.rb:217:in `block in action'
      83: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/machine.rb:248:in `action_raw'
      82: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/runner.rb:101:in `run'
      81: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/util/busy.rb:19:in `busy'
      80: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/runner.rb:101:in `block in run'
      79: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/builder.rb:180:in `call'
      78: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      77: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
      76: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      75: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/builtin/box_check_outdated.rb:93:in `call'
      74: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      73: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/builtin/call.rb:53:in `call'
      72: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/runner.rb:101:in `run'
      71: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/util/busy.rb:19:in `busy'
      70: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/runner.rb:101:in `block in run'
      69: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/builder.rb:180:in `call'
      68: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      67: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
      66: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      65: from /root/.vagrant.d/gems/2.7.6/gems/vagrant-libvirt-0.11.2/lib/vagrant-libvirt/action/cleanup_on_failure.rb:21:in `call'
      64: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      63: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/builtin/provision.rb:80:in `call'
      62: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      61: from /root/.vagrant.d/gems/2.7.6/gems/vagrant-libvirt-0.11.2/lib/vagrant-libvirt/action/set_name_of_domain.rb:34:in `call'
      60: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      59: from /root/.vagrant.d/gems/2.7.6/gems/vagrant-libvirt-0.11.2/lib/vagrant-libvirt/action/handle_storage_pool.rb:63:in `call'
      58: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      57: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/builtin/handle_box.rb:56:in `call'
      56: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      55: from /root/.vagrant.d/gems/2.7.6/gems/vagrant-libvirt-0.11.2/lib/vagrant-libvirt/action/handle_box_image.rb:127:in `call'
      54: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      53: from /root/.vagrant.d/gems/2.7.6/gems/vagrant-libvirt-0.11.2/lib/vagrant-libvirt/action/create_domain_volume.rb:97:in `call'
      52: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      51: from /root/.vagrant.d/gems/2.7.6/gems/vagrant-libvirt-0.11.2/lib/vagrant-libvirt/action/resolve_disk_settings.rb:143:in `call'
      50: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      49: from /root/.vagrant.d/gems/2.7.6/gems/vagrant-libvirt-0.11.2/lib/vagrant-libvirt/action/create_domain.rb:452:in `call'
      48: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      47: from /root/.vagrant.d/gems/2.7.6/gems/vagrant-libvirt-0.11.2/lib/vagrant-libvirt/action/create_networks.rb:98:in `call'
      46: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      45: from /root/.vagrant.d/gems/2.7.6/gems/vagrant-libvirt-0.11.2/lib/vagrant-libvirt/action/create_network_interfaces.rb:197:in `call'
      44: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      43: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/builtin/call.rb:53:in `call'
      42: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/runner.rb:101:in `run'
      41: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/util/busy.rb:19:in `busy'
      40: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/runner.rb:101:in `block in run'
      39: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/builder.rb:180:in `call'
      38: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      37: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
      36: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      35: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/builtin/call.rb:53:in `call'
      34: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/runner.rb:101:in `run'
      33: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/util/busy.rb:19:in `busy'
      32: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/runner.rb:101:in `block in run'
      31: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/builder.rb:180:in `call'
      30: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      29: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
      28: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      27: from /root/.vagrant.d/gems/2.7.6/gems/vagrant-libvirt-0.11.2/lib/vagrant-libvirt/action/prepare_nfs_valid_ids.rb:14:in `call'
      26: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      25: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/plugins/synced_folders/nfs/action_cleanup.rb:25:in `call'
      24: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      23: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/builtin/synced_folder_cleanup.rb:28:in `call'
      22: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      21: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/builtin/delayed.rb:19:in `call'
      20: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      19: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/builtin/synced_folders.rb:87:in `call'
      18: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      17: from /root/.vagrant.d/gems/2.7.6/gems/vagrant-libvirt-0.11.2/lib/vagrant-libvirt/action/prepare_nfs_settings.rb:21:in `call'
      16: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      15: from /root/.vagrant.d/gems/2.7.6/gems/vagrant-libvirt-0.11.2/lib/vagrant-libvirt/action/share_folders.rb:22:in `call'
      14: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      13: from /root/.vagrant.d/gems/2.7.6/gems/vagrant-libvirt-0.11.2/lib/vagrant-libvirt/action/set_boot_order.rb:22:in `call'
      12: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
      11: from /root/.vagrant.d/gems/2.7.6/gems/vagrant-libvirt-0.11.2/lib/vagrant-libvirt/action/start_domain.rb:568:in `call'
      10: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
       9: from /root/.vagrant.d/gems/2.7.6/gems/vagrant-libvirt-0.11.2/lib/vagrant-libvirt/action/wait_till_up.rb:51:in `call'
       8: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
       7: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/builtin/wait_for_communicator.rb:71:in `call'
       6: from /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in `call'
       5: from /root/.vagrant.d/gems/2.7.6/gems/vagrant-libvirt-0.11.2/lib/vagrant-libvirt/action/forward_ports.rb:34:in `call'
       4: from /root/.vagrant.d/gems/2.7.6/gems/vagrant-libvirt-0.11.2/lib/vagrant-libvirt/action/forward_ports.rb:39:in `forward_ports'
       3: from /root/.vagrant.d/gems/2.7.6/gems/vagrant-libvirt-0.11.2/lib/vagrant-libvirt/action/forward_ports.rb:39:in `each'
       2: from /root/.vagrant.d/gems/2.7.6/gems/vagrant-libvirt-0.11.2/lib/vagrant-libvirt/action/forward_ports.rb:51:in `block in forward_ports'
       1: from /root/.vagrant.d/gems/2.7.6/gems/vagrant-libvirt-0.11.2/lib/vagrant-libvirt/action/forward_ports.rb:134:in `redirect_port'
/root/.vagrant.d/gems/2.7.6/gems/vagrant-libvirt-0.11.2/lib/vagrant-libvirt/action/forward_ports.rb:134:in `spawn': No such file or directory - ssh (Errno::ENOENT)

在我使用谷歌后,我发现有人在另一个页面上有相同的堆栈跟踪,有人回答说DetectionLab安装在另一个驱动器上,需要安装在与Vagrant相同的驱动器上。我在指令/Dockerfile中看不到任何关于DetectionLab的信息。我已经谷歌,但不明白如何安装DetectionLab在同一容器和设置Dockerfile正确。

有没有人有任何线索或可以帮助我?

我遇到了同样的问题,根据错误消息,ssh缺失。我通过在Dockerfile中添加ssh和sshd来解决这个问题,在ENTRYPOINT:

之前
RUN apt-get install -y openssh-server openssh-client

相关内容

  • 没有找到相关文章

最新更新