Docker Community Forums

Share and learn in the Docker community.

Error when building docker iamge

Hi all. I have a Dockerfile look like this

# Start from golang:latest
FROM golang:1.12


# Add Maintainer Info
LABEL maintainer="Yuri Gasparyan <yuriwebdev@yandex.ru>"


RUN mkdir -p /home/root/go/src

RUN mkdir -p /home/root/go/bin

RUN mkdir -p /home/root/go/pkg

ENV GOPATH=/home/root/go



# Set the Current Working Directory inside the container
WORKDIR $GOPATH/src/abc/bcd


# Copy everything from the current directory to the PWD(Present Working Directory) inside the container
COPY . .


# Set the Current Working Directory inside the container
WORKDIR $GOPATH/src/github.com/abc/bcd


RUN echo $GOPATH

# Download all the dependencies
RUN  ["/bin/bash", "-c", "go get  -v ./..."]

# Install the package
RUN go install -v ./...

# This container exposes port 8080 to the outside world
EXPOSE 8080
EXPOSE 4001

# Run the executable
CMD ["node","start"]

When trying to build the image
sudo docker build -t node .

After getting all dependencies I am getting an error look like this

....
....
get "golang.org/x/oauth2": found meta tag get.metaImport{Prefix:"golang.org/x/oauth2", VCS:"git", RepoRoot:"https://go.googlesource.com/oauth2"} at https://golang.org/x/oauth2?go-get=1
golang.org/x/oauth2 (download)
github.com/cesanta/ubjson (download)
github.com/golang/glog (download)
The command '/bin/bash -c go get  -v ./...' returned a non-zero code: 1

Help me please to solve this problem