I have dockerfile:
FROM alpine:latest
COPY . .
# C-CPP
RUN apk update \
&& apk add build-base \
&& apk add g
# JAVA 8
RUN apk fetch openjdk8 \
&& apk add openjdk8
ENV JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk
ENV PATH="$JAVA_HOME/bin:${PATH}"
# Python 3
RUN apk add python3 py3-pip \
&& apk add --upgrade bash
RUN ["chmod", " x", "./run.sh"]
ENTRYPOINT [ "./run.sh" ]
When I hit command docker build -t dockerfile .
. I get this error and what mean this and how to fix it?
[ ] Building 28.2s (3/3) FINISHED => [internal] load build definition from Dockerfile 1.3s => => transferring dockerfile: 32B 0.2s => [internal] load .dockerignore 1.6s => => transferring context: 2B 0.1s => ERROR [internal] load metadata for docker.io/library/alpine:latest 26.5s
[internal] load metadata for docker.io/library/alpine:latest: ------ failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to do request: Head "https://registry-1.docker.io/v2/library/alpine/manifests/latest": dial tcp 52.200.78.26:443: i/o timeout
CodePudding user response:
This is clearly network timeout issue. There is no syntax error, shared dockerfile works fine.
How to verify network issue: if you have curl tool
curl -v https://registry-1.docker.io/v2/library/alpine/manifests/latest
Output from curl
or just type in browswer
https://registry-1.docker.io/v2/library/alpine/manifests/latest