I am trying to run a scratch docker container on my local from my go code. The Dockerfile is as follows:
FROM golang:1.11.4 as builder
WORKDIR /app
ADD . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GOARM=7 make
FROM scratch
COPY --from=builder /app/myprogram .
In my code I try to connect to mongodb using the following url mongodb+srv://myusername:mypassword@my-staging-vki7g.gcp.mongodb.net
I can connect to this mongodb perfectly fine on my local mongoshell. However, when I run my scracth container, I get the following error
error parsing uri (mongodb+srv://myusername:mypassword@my-staging-vki7g.gcp.mongodb.net): lookup provendb-staging-vki7g.gcp.mongodb.net on 192.168.65.1:53: cannot unmarshal DNS message
Are there any dependencies that need to be added?