去Dep不在docker-compose上运行

My problem is docker-compose always return:

golang_1 | bash: dep: command not found

It's my docker-compose.yml :

    version: "3"

services:
  postgres:
    image: postgres
    environment:
      POSTGRES_USER: mini_api
      POSTGRES_PASSWORD: p4ssw0rd
      POSTGRES_DB: mini-api
    volumes:
      - ./db.sql:/docker-entrypoint-initdb.d/db.sql
    ports:
    - "5433:5432"

  golang:
    image: golang:1.11.0-stretch
    volumes:
      - ./:$GOPATH/src/github.com/bagusandrian/mini-api
    working_dir: $GOPATH/src/github.com/bagusandrian/mini-api
    links:
        - postgres
    ports: 
      - "8000:9090"
    command: bash -c "dep ensure -v && go build -v && ./mini-api"

I run with command: docker-compose up and always return:

golang_1    | bash: dep: command not found

Any false in my docker-compose.yml or I missing something?

You can pull from my repo: http://github.com/bagusandrian/mini-api

You need to install go dep first. Add this to your images

RUN go get -u github.com/golang/dep/cmd/dep

Or to the compose file:

command: >
    bash -c "go get -u github.com/golang/dep/cmd/dep
    && dep ensure -v && go build -v && ./mini-api"