I'm trying to get a Windows application to run in a Ubuntu docker container. When installing wine32 I get the following errors (I'm on a 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?
I already tried out several fixes and (this is where it gets really headach-inducing) some of them actually fixed the issue but then it popped up again:
- First of all I followed the links in the error messages and made sure they exist
- I tried the fixes suggested in the error message as well as the --no-cache flag I read about but both didn't help.
- I used the --network=host flag, which did fix the issue for one build, but then it came back
- I added the DNS server of my company to deamon.json, which fixed the issue for another run, but then it came back yet again
Edit: Putting apt-get upgrade in the dockerfile fixed it for another single run. In this one run, it seemed to only pull 201 packages instead of the usual 230, which was fortunate, as 202 is the first that usually fails.
Dockerfile:
FROM ubuntu
WORKDIR /app
COPY Debug.7z ./
COPY dist.7z ./
RUN dpkg --add-architecture i386
RUN apt-get update && apt-get -y upgrade
RUN apt-get update && apt-get -y install wine32
RUN apt-get update && apt-get -y install p7zip
RUN 7zr x -oDebug Debug.7z
RUN 7zr x -oDebug dist.7z
CMD ["wine", "Debug/File.exe"]
Command:
docker build --network=host --no-cache -t file.linux:test .