ktock / container2wasm

Container to WASM converter
https://ktock.github.io/container2wasm-demo/
Apache License 2.0
1.97k stars 72 forks source link

Failed to solve process "apt-get" for golang-base container #267

Closed allogic closed 4 months ago

allogic commented 4 months ago

It seems that the golang-base has some problems when converting.

38.67 Reading package lists...
38.69 Building dependency tree...
38.70 Reading state information...
38.70 E: Unable to locate package gperf
------
container2wasm2433911993:337
--------------------
 335 |     FROM golang-base AS runc-amd64-dev
 336 |     ARG RUNC_VERSION
 337 | >>> RUN apt-get update -y && apt-get install -y git make gperf
 338 |     RUN --mount=type=cache,target=/root/.cache/go-build \
 339 |         --mount=type=cache,target=/go/pkg/mod \
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update -y && apt-get install -y git make gperf" did not complete successfully: exit code: 100
exit status 1
ktock commented 4 months ago

Thanks for reporting the issue. What is the host environment (OS,arch) and docker version? Are you using proxies or something?

allogic commented 4 months ago

It is ubuntu running in the WSL (Win11): Linux XXX 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Docker version with the WSL support enabled instead of Hyper-V: Docker version 26.1.0, build 9714adc

No proxies are being used.

I've worked with this setup alot and never noticed a problem until now.

ktock commented 4 months ago

Does the gperf issue occur in the normal container (not c2w) as well? i.e. docker run --rm -it golang:1.21-bullseye /bin/sh -c "apt-get update -y && apt-get install -y gperf"

allogic commented 4 months ago

Yes this worked! It seems there is some issue with the network inside the WSL..

ktock commented 4 months ago

Thanks for trying it. I'll close this issue as it seems to be solved.