github.com/jbking/gohan@v0.0.0-20151217002006-b41ccf1c2a96/Dockerfile (about)

     1  FROM ubuntu:14.04
     2  
     3  MAINTAINER Karthik Ramasubramanian <karthik@ntti3.com>
     4  
     5  ENV GO_VERSION 1.4.2
     6  ENV GOPATH  /go
     7  ENV GOHAN_PATH $GOPATH/src/github.com/cloudwan/gohan
     8  
     9  # Install go
    10  ADD https://storage.googleapis.com/golang/go$GO_VERSION.linux-amd64.tar.gz /
    11  RUN tar xzvf go$GO_VERSION.linux-amd64.tar.gz && mv /go /usr/local/go
    12  
    13  # Update apt
    14  RUN apt-get update
    15  
    16  # Install dependencies for go-get
    17  RUN apt-get install -y bzr \
    18                         curl \
    19                         git \
    20                         mercurial
    21  
    22  # Install build tools
    23  RUN apt-get install -y build-essential
    24  
    25  # Setup environment varialbles for go
    26  # NOTE: It is now recommended to not set GOROOT.
    27  ENV PATH  /usr/local/go/bin:/go/bin:$PATH
    28  
    29  # Bundle app source
    30  ADD . /src
    31  
    32  WORKDIR $GOHAN_PATH
    33  ADD . $GOHAN_PATH
    34  # Jenkins hack that adds keys.
    35  RUN rm -rf keys
    36  
    37  # Install first few dependencies
    38  RUN go get github.com/tools/godep
    39  RUN go get github.com/golang/lint/golint
    40  RUN go get github.com/coreos/etcd
    41  RUN go get golang.org/x/tools/cmd/cover
    42  RUN go get golang.org/x/tools/cmd/vet
    43  
    44  # Build gohan
    45  RUN cd $GOHAN_PATH; make all install
    46  
    47  ENTRYPOINT ["gohan", "server", "--config-file", "etc/gohan.yaml"]