gliderlabs / docker-alpine

Alpine Linux Docker image. Win at minimalism!
http://gliderlabs.viewdocs.io/docker-alpine
BSD 2-Clause "Simplified" License
5.7k stars 528 forks source link

Issue in minikube docker --> ERROR: http://nl.alpinelinux.org/alpine/v3.5/main: DNS lookup error #560

Open hamidabdul1994 opened 3 years ago

hamidabdul1994 commented 3 years ago

I am using minikube configured docker. But when i am building docker image, which is giving error DNS lookup error. I am stuck to build docker. But if i am building docker image without minikube it is working and giving desire output. can any one help me to solve issue. As per my understanding issue occurs with minikube.

# Image Used
FROM golang:alpine AS builder

# Get dependent packages
RUN apk update && apk add git && apk add make

# First Stage: Builds the app
WORKDIR /app
COPY . .

# Run the custom Makefile to manage build flags and inject
RUN make docker_build

# Second Stage: Copies the binary and requirements and runs the app
FROM alpine AS bin
......

EXPOSE 8080
CMD ["./my_service"]
techvlad commented 3 years ago

Try to add

RUN sed -i -e 's/http:/https:/' /etc/apk/repositories

After FROM line, that helps me