title: Error Connect a docker Instance to mongoDB atlas
body: <p>I made a go App conected to MongoDB Atlas and works fine when run locally, but when i tried to create docker-compose i get this error</p>
  <pre><code>error parsing uri: lookup _mongodb._tcp.cluster0.mrknb.mongodb.net on 127.0.0.11:53: read udp 127.0.0.1:37379-&gt;127.0.0.11:53: i/o timeout
  </code></pre>
  <p>My connection string is :</p>
  <pre><code>mongodb+srv://apiVentas:&lt;password&gt;@cluster0.mrknb.mongodb.net/&lt;dbname&gt;?retryWrites=true&amp;w=majority
  </code></pre>
  <p>My DockerFile is:</p>
  <pre><code>FROM golang:alpine AS builder
  
  ENV GO111MODULE=on \
  CGO_ENABLED=0 \
  GOOS=linux \
  GOARCH=amd64
  
  WORKDIR /build
  
  COPY go.mod .
  COPY go.sum .
  RUN go mod download
  
  COPY . .
  
  RUN go test ./...
  
  RUN go build -o main .
  
  WORKDIR /dist
  
  RUN cp /build/main .
  
  FROM scratch
  
  COPY --from=builder /dist/main /
  
  ENTRYPOINT [&quot;/main&quot;]
  </code></pre>
  <p>And Docker-compose is</p>
  <pre><code>version: &quot;3&quot;
  
  services:
   web:
    container_name: apiVentas
    restart: always
    build: .
    ports:
        - &quot;3000:3000&quot;
    volumes:
      - .:/home/perajim/go/src/api.ventas
    dns:
     - 1.1.1.1
     - 1.0.0.1  
     - 8.8.8.8
  </code></pre>
  <p>I add my IP to list in mongoDB Atlas</p>
  <p>It's necessary some configuration in docker?</p>