在docker容器中安装wine32

时间:2019-06-19 08:35:16

标签: docker

我正在尝试让Windows应用程序在Ubuntu Docker容器中运行。安装wine32时,出现以下错误(我在Windows 10 PC上):

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libx/libxcb/libxcb1_1.13-2~ubuntu18.04_amd64.deb  Undetermined Error [IP: 91.189.88.149 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libi/libieee1284/libieee1284-3_0.2.11-13_i386.deb  Undetermined Error [IP: 91.189.88.149 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

我已经尝试了一些修复程序,(这确实引起了头痛),其中一些实际上解决了该问题,但随后又弹出了:

  • 首先,我遵循了错误消息中的链接,并确保它们存在
  • 我尝试了错误消息中建议的修复程序以及我读到的--no-cache标志,但都没有帮助。
  • 我使用了--network = host标志,它确实解决了一个构建问题,但后来又回来了
  • 我在deamon.json中添加了我公司的DNS服务器,该服务器修复了该问题以供再次运行,但随后又回来了

编辑:将 apt-get upgrade 放置在dockerfile中,将其修复为另一次运行。在这一轮中,似乎只拉了201个包裹,而不是通常的230个,这很幸运,因为202是第一个经常失败的包裹。

Dockerfile:

FROM ubuntu
WORKDIR /app

COPY . ./

RUN dpkg --add-architecture i386
RUN apt-get update && apt-get -y upgrade
RUN apt-get update && apt-get -y install curl

RUN apt-get update && apt-get -y install wine32 
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
RUN apt-get update && apt-get -y install nodejs
RUN apt-get update && apt-get -y install p7zip-full
RUN npm install -g innosetup-compiler

RUN 7z x Debug.7z -oinput
RUN 7z x dist.7z -oinput

RUN innosetup-compiler Setup.iss

命令:

docker build --network=host --no-cache -t setup:linux .

0 个答案:

没有答案