title: DataDog docker agent doesn't recieve logs from application container
body: <p>I have Golang app, it writes logs to Stdout with Logrus.
  I was trying to recreate this <a href="https://github.com/DataDog/docker-compose-example" rel="nofollow noreferrer">https://github.com/DataDog/docker-compose-example</a> scenario, and replace python app with my app.
  But logs aren't coming to Datadog dashboad
  This is docker-compose I'm trying to make work</p>
  
  <pre><code>version: "3"
  services:
    gos:
      build: goapp
      stdin_open: true
      ports:
        - "6000:6000"
      volumes:
        - /tmp/goapp:/tmp/goapp
        - ./goapp:/code
        - /var/run/docker.sock:/var/run/docker.sock
      environment:
        - DATADOG_HOST=datadog
    web:
      build: web
      command: python app.py
      ports:
       - "5000:5000"
      volumes:
       - ./web:/code # modified here to take into account the new app path
      links:
       - redis
      environment:
       - DATADOG_HOST=datadog # used by the web app to initialize the Datadog library
    redis:
      image: redis
    # agent section
    datadog:
      build: datadog
      links:
       - redis # ensures that redis is a host that the container can find
       - web # ensures that the web app can send metrics
      environment:
       - DD_API_KEY=34f-------63c
      volumes:
       - /var/run/docker.sock:/var/run/docker.sock
       - /proc/:/host/proc/:ro
       - /sys/fs/cgroup:/host/sys/fs/cgroup:ro
  </code></pre>
  
  <p>I also tried non-compose, but simple docker container installation for the agent by this <a href="https://docs.datadoghq.com/logs/log_collection/docker/?tab=containerinstallation" rel="nofollow noreferrer">https://docs.datadoghq.com/logs/log_collection/docker/?tab=containerinstallation</a> instructions.</p>
  
  <p>I run my golang app container with</p>
  
  <pre><code>docker run -v /var/run/docker.sock:/var/run/docker.sock:rw -d testgo
  </code></pre>
  
  <p>with Dockerfile</p>
  
  <pre><code>FROM golang:1.7.3
  WORKDIR /go/src/github.com/alexellis/href-counter/
  RUN go get -d -v github.com/Sirupsen/logrus
  COPY app.go .
  RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
  
  FROM alpine:latest  
  RUN apk --no-cache add ca-certificates
  WORKDIR /root/
  COPY --from=0 /go/src/github.com/alexellis/href-counter/app .
  EXPOSE 6000
  LABEL "com.datadoghq.ad.logs"='[{"source": "goapp", "service": "webapp"}]'
  CMD ["./app"] 
  </code></pre>
  
  <p>and DD agent can see app container ups and downs but receive no logs</p>