Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker build fails #1

Open
ibartel opened this issue May 18, 2022 · 3 comments
Open

Docker build fails #1

ibartel opened this issue May 18, 2022 · 3 comments

Comments

@ibartel
Copy link

ibartel commented May 18, 2022

Sending build context to Docker daemon  122.4kB
Step 1/8 : FROM ubuntu
 ---> d2e4e1f51132
Step 2/8 : RUN dpkg --add-architecture i386     && apt update     && apt install -y wine64 wine32 wget unzip xvfb     && mkdir -p /root/.wine/drive_c/steamcmd     && mkdir -p /root/.wine/drive_c/users/root/AppData/LocalLow/'Stunlock Studios'/VRisingServer/Settings     && wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip -P /root/.wine/drive_c/steamcmd/     && cd /root/.wine/drive_c/steamcmd/     && unzip steamcmd.zip     && mkdir -p /root/.wine/drive_c/VRisingServer/     && cd /root/.wine/drive_c/steamcmd
 ---> Running in 98733936fc67

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:2 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [109 kB]
Get:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [90.7 kB]
Get:5 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [4653 B]
Get:6 http://security.ubuntu.com/ubuntu jammy-security/universe i386 Packages [14.2 kB]
Get:7 http://security.ubuntu.com/ubuntu jammy-security/multiverse i386 Packages [991 B]
Get:8 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [97.8 kB]
Get:9 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [132 kB]
Get:10 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [64.3 kB]
Get:11 http://security.ubuntu.com/ubuntu jammy-security/main i386 Packages [30.1 kB]
Get:12 http://security.ubuntu.com/ubuntu jammy-security/restricted i386 Packages [23.5 kB]
Get:13 http://archive.ubuntu.com/ubuntu jammy/multiverse i386 Packages [134 kB]
Get:14 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB]
Get:15 http://archive.ubuntu.com/ubuntu jammy/restricted i386 Packages [36.7 kB]
Get:16 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [17.5 MB]
Get:17 http://archive.ubuntu.com/ubuntu jammy/universe i386 Packages [9385 kB]
Get:18 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1792 kB]
Get:19 http://archive.ubuntu.com/ubuntu jammy/main i386 Packages [1324 kB]
Get:20 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [266 kB]
Get:21 http://archive.ubuntu.com/ubuntu jammy-updates/restricted i386 Packages [24.0 kB]
Get:22 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [4653 B]
Get:23 http://archive.ubuntu.com/ubuntu jammy-updates/universe i386 Packages [35.7 kB]
Get:24 http://archive.ubuntu.com/ubuntu jammy-updates/main i386 Packages [96.5 kB]
Get:25 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [192 kB]
Get:26 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse i386 Packages [991 B]
Get:27 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [106 kB]
Get:28 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [132 kB]
Fetched 32.1 MB in 2s (19.4 MB/s)
Reading package lists...
E: Problem executing scripts APT::Update::Post-Invoke 'rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true'
E: Sub-process returned an error code
The command '/bin/sh -c dpkg --add-architecture i386     && apt update     && apt install -y wine64 wine32 wget unzip xvfb     && mkdir -p /root/.wine/drive_c/steamcmd     && mkdir -p /root/.wine/drive_c/users/root/AppData/LocalLow/'Stunlock Studios'/VRisingServer/Settings     && wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip -P /root/.wine/drive_c/steamcmd/     && cd /root/.wine/drive_c/steamcmd/     && unzip steamcmd.zip     && mkdir -p /root/.wine/drive_c/VRisingServer/     && cd /root/.wine/drive_c/steamcmd' returned a non-zero code: 100
@Glitchm
Copy link

Glitchm commented May 19, 2022

So the weird thing is I've built the image numerous times now for testing and can't say the builds have ever tripped up in the early stages.

I've had something similar like this recently where I wasn't able to build an image and had to run docker system prune to clear what I'm assuming were some cached images that was stopping my builds. So might be worth trying that if you're not worried about removing unused images/containers

@bluearcher-bc
Copy link

yeah that's a really strange place for it to fail, and with an error that seems to indicate a problem with apt itself in the Ubuntu image? I honestly don't know how this happened.

@Danpiel
Copy link

Danpiel commented May 22, 2022

Hello, came across same issue, here is quick fix, add it before apt-update in Dockerfile

RUN sed -i -e 's/^APT/# APT/' -e 's/^DPkg/# DPkg/'
/etc/apt/apt.conf.d/docker-clean

Or pin to ubuntu:20.04 by changing to FROM ubuntu:20.04

To fix permanently, you need to upgrade Docker Engine

https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository

Related issue moby/moby#42681
Original solution from https://stackoverflow.com/a/71982514

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants