fasthttp-prefork.dockerfile 497 B

123456789101112131415161718192021
  1. FROM golang:1.12
  2. ADD ./ /fasthttp
  3. WORKDIR /fasthttp
  4. RUN mkdir bin
  5. ENV GOPATH /fasthttp
  6. ENV PATH ${GOPATH}/bin:${PATH}
  7. RUN rm -rf ./pkg/*
  8. RUN go get -d -u github.com/go-sql-driver/mysql
  9. RUN go get -d -u github.com/valyala/fasthttp/...
  10. RUN go get -u github.com/valyala/quicktemplate/qtc
  11. RUN go get -u github.com/mailru/easyjson/...
  12. RUN rm -f ./server-mysql
  13. RUN go generate templates
  14. # RUN easyjson -all src/common/common.go
  15. RUN go build -gcflags='-l=4' server-mysql
  16. CMD ./server-mysql -prefork