Skip to main content

Command Palette

Search for a command to run...

Failed to build docker image with warning message "IPv4 forwarding is disabled. Networking will not work"

Updated
•1 min read•View as Markdown
Failed to build docker image with warning message "IPv4 forwarding is disabled. Networking will not work"
A

I am a Software Developer, mainly involved in Software Development of JAVA-enabled web applications.

Problem

Step 3/12 : RUN apk add openjdk11
 ---> [Warning] IPv4 forwarding is disabled. Networking will not work.
 ---> Running in 0f20ee3ab3eb
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/x86_64/APKINDEX.tar.gz
ERROR: https://dl-cdn.alpinelinux.org/alpine/v3.16/main: temporary error (try again later)
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.16/main: No such file or directory
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz
ERROR: https://dl-cdn.alpinelinux.org/alpine/v3.16/community: temporary error (try again later)
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.16/community: No such file or directory
ERROR: unable to select packages:
  openjdk11 (no such package):
    required by: world[openjdk11]
The command '/bin/sh -c apk add openjdk11' returned a non-zero code: 1

Solution

  • Update configuration

    sysctl -w net.ipv4.ip_forward=1
    
  • Read configuration

    sysctl net.ipv4.ip_forward
    
162 views

More from this blog

A

Ada's Programming Notebook

22 posts

I am a software developer based in Manchester, United Kingdom. Recently, I'm interested in Cloud Computing. I study writing Java SpringBoot and Node.js applications in AWS and Google Cloud.