Trying to install grafana with docker-compoe.yml and Dockerfile. which is giving me error of "go command not found" i think this is because gopath is not set

docker

#1
version: '3'
services:
  web:
  build: .
  container_name: grafana
  ports:
    - "9000:3000"
  expose:
    - 9000
  volumes:
    - .:/newvolebs
  networks:
    - overlay
  environment:
     MYSQL_HOST: mysql
     MYSQL_DATABASE: grafana
     MYSQL_USERNAME: root
     MYSQL_PASSWORD: 12345
mysql:
  image: mysql:5.6
  ports:
    - "3306:3306"
  expose:
    - 3306
  volumes:
    - newvolebs:/var/lib/mysql
  networks:
    - overlay
  environment:
      MYSQL_ROOT_PASSWORD: 12345
      MYSQL_DATABASE: grafana
volumes:
  newvolebs:
   driver: local
networks:
  overlay:
   driver: "bridge"

and my dockerfile is

FROM centos:centos7
RUN     useradd centos && \
             yum install -y sudo && \
             echo "centos ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
USER centos
ENV PATH="/home/centos/go:${PATH}"
RUN     sudo cd /home/centos && \
    sudo yum -y update && \
    sudo yum --setopt=tsflags=nodocs -y install \
    wget \git \
    gcc-c++ make \tar && \
    sudo wget https    ://storage.googleapis.com/golang/go1.11.2.linux-amd64.tar.gz && \
    sudo tar -xzvf go1.11.2.linux-amd64.tar.gz && \
    sudo mv go gocode && \
    curl --silent --location https     ://  rpm.nodesource.com/setup_9.x | sudo bash && \
    sudo yum -y install nodejs && \
    yum clean all && \
    sudo chmod 666 ~/.bashrc && \
    sudo echo "export GOROOT=$HOME/gocode" >> ~/.bashrc \
    && sudo echo "export PATH=$PATH:$GOROOT/bin" >> ~/.bashrc \
    && sudo echo "export GOPATH=$HOME/go" >> ~/.bashrc \
    && sudo echo "export PATH=$PATH:$GOPATH/bin" >> ~/.bashrc && \
    PATH="${GOROOT}/bin:$PATH}" && \
    export GOPATH=/home/centos/go && \
    export GOROOT=/home/centos/gocode && \
    source /home/centos/.bashrc && \
    sudo mkdir -p $HOME/go/{src,pkg,bin} && \
    cd $GOPATH/src && \
    go get github.com/grafana/grafana && \
    cd $GOPATH/src/github.com/grafana/grafana && \
    go run build.go setup \
    go run build.go build && \
    npm install -g yarn && \
    yarn install --pure-lockfile && \
    yarn watch && \
    cd go/src/github.com/grafana/grafana/bin/  && \
    grafana-server \
    echo "[main_settings]" > /var/www/html/config.ini \
    && echo "headerTitle='Dashboard'" >> /var/www/html/config.ini \
    && echo "encryptKey='ffgfjhvjhvjcfgfjj'" >> /var/www/html/config.ini \
    && echo ";Timezone Setting. ex: 'America/New_York'" >> /var/www/html/config.ini \
    && echo "defaultTimezone=''" >> /var/www/html/config.ini \
    && echo ";Database parameters for system usage (Should not be used by custom dashboard/charts)" >> /var/www/html/config.ini \
    && echo "dashboardDatabaseServer=mysql" >> /var/www/html/config.ini \
    && echo "dashboardDatabaseName=dashboard" >> /var/www/html/config.ini \
    && echo "dashboardDatabaseUserName=root" >> /var/www/html/config.ini \
    && echo "dashboardDatabasePassword=12345 >> /var/www/html/config.ini \
    && echo ";grafana credentials" >> /var/www/html/config.ini \
    && echo "grafanaDatabaseServer=mysql" >> /var/www/html/config.ini \
    && echo "grafanaDatabaseName=grafana" >> /var/www/html/config.ini \
    && echo "grafanaDatabaseUserName=root" >> /var/www/html/config.ini \
    && echo "grafanaDatabasePassword=12345" >> /var/www/html/config.ini && \
EXPOSE  9000
WORKDIR  /home/centos