Docker image build crashes with the error

I am trying to create a docker image for the Wago Connector app from advanced tutorial.

cd DemoMachineKit
npm run node:wago-connector:docker:build-amd64

The build process aborts with error message:

Step 1/9 : FROM node:10-alpine as build
—> b328632eb00c
Step 2/9 : WORKDIR /usr/src/app
—> Using cache
—> 5b881408aef5
Step 3/9 : RUN apk add --update gcc g++ libc-dev python3 make
—> Running in 031fe7601bd2
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.11/main: temporary error (try again later)
WARNING: Ignoring APKINDEX.70f61090.tar.gz: No such file or directory
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.11/community: temporary error (try again later)
WARNING: Ignoring APKINDEX.ca2fea5b.tar.gz: No such file or directory
ERROR: unsatisfiable constraints:

My configuration is

I have found the solution to my question. Solution was to build docker image with flag "–network host"
Here is the changed line in DemoMachineKit/package.json

./DemoMachineKit/package.json

“node:wago-connector:docker:build-amd64”: “npm run node:wago-connector:build && docker build --network host -t wago-connector-amd64 -f src/wago-connector/Dockerfile .”,

2 Likes

Hi Mugdin,

Nice that you arrived here.

Thanks for sharing your solution. I’m very glad that you can carry on!

It seems that some virtual network adapters are not working correctly.

The ‘proper’ fix for that issue is not so easy. It requires a complete uninstallation of your docker instance and removing all ethernet docker adapters in your system.

At least, this method fixed the issue on my PC.

Best regards
Alex