gliderlabs/docker-alpine

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

Opened this issue · 1 comments

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"]

Try to add

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

After FROM line, that helps me