go-postgres.dockerfile 216 B

123456789101112
  1. FROM golang:1.11.5
  2. ADD ./ /go-std
  3. WORKDIR /go-std
  4. RUN mkdir bin
  5. ENV GOPATH /go-std
  6. ENV PATH ${GOPATH}/bin:${PATH}
  7. RUN go get github.com/lib/pq
  8. RUN go build -o hello_postgres hello_postgres.go
  9. CMD ./hello_postgres