2017-01-23 09:52:29 +03:00
|
|
|
FROM golang:1.7.4
|
2014-11-18 08:41:24 +03:00
|
|
|
MAINTAINER Liang Ding <dl88250@gmail.com>
|
2014-11-18 07:01:17 +03:00
|
|
|
|
2017-01-23 11:42:32 +03:00
|
|
|
RUN apt-get update && apt-get install bzip2
|
|
|
|
|
|
|
|
ENV GOROOT /usr/local/go
|
|
|
|
ENV GOROOT_BOOTSTRAP=$GOROOT
|
|
|
|
|
|
|
|
RUN cd /usr/local/go/src && export GOOS=darwin && export GOARCH=amd64 && ./bootstrap.bash --no-clean
|
|
|
|
RUN cd /usr/local/go/src && export GOOS=linux && export GOARCH=arm && ./bootstrap.bash --no-clean
|
|
|
|
RUN cd /usr/local/go/src && export GOOS=windows && export GOARCH=amd64 && ./bootstrap.bash --no-clean
|
2017-01-23 09:52:29 +03:00
|
|
|
|
2014-11-20 11:05:39 +03:00
|
|
|
ADD . /wide/gogogo/src/github.com/b3log/wide
|
2015-08-05 06:46:44 +03:00
|
|
|
|
2015-08-05 07:58:39 +03:00
|
|
|
RUN tar zxf /wide/gogogo/src/github.com/b3log/wide/deps/golang.org.tar.gz -C /wide/gogogo/src/
|
|
|
|
RUN tar zxf /wide/gogogo/src/github.com/b3log/wide/deps/github.com.tar.gz -C /wide/gogogo/src/
|
2014-11-20 11:05:39 +03:00
|
|
|
|
2014-12-18 06:55:30 +03:00
|
|
|
RUN useradd wide && useradd runner
|
2014-11-19 11:13:46 +03:00
|
|
|
|
2014-11-20 10:52:44 +03:00
|
|
|
ENV GOPATH /wide/gogogo
|
2014-11-19 10:44:41 +03:00
|
|
|
|
2017-01-23 11:42:32 +03:00
|
|
|
RUN go build github.com/go-fsnotify/fsnotify
|
|
|
|
RUN go build github.com/gorilla/sessions
|
2015-08-05 08:23:48 +03:00
|
|
|
RUN go build github.com/gorilla/websocket
|
|
|
|
|
2015-08-05 08:49:12 +03:00
|
|
|
RUN go install github.com/visualfc/gotools github.com/nsf/gocode github.com/bradfitz/goimports
|
|
|
|
|
2014-11-20 10:52:44 +03:00
|
|
|
WORKDIR /wide/gogogo/src/github.com/b3log/wide
|
2015-08-05 08:16:53 +03:00
|
|
|
RUN go build -v
|
2014-12-13 17:03:55 +03:00
|
|
|
|
2017-01-23 11:42:32 +03:00
|
|
|
EXPOSE 7070
|