-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
62 lines (57 loc) · 2.17 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
FROM alpine:3.6
MAINTAINER Eagle Liut <[email protected]>
RUN apk --update add \
bash \
ca-certificates \
git \
go \
go-tools \
make \
libc-dev \
openssh-client \
postgresql-client \
&& rm -f /usr/bin/godoc /usr/lib/go/bin/godoc \
&& rm -f /usr/bin/darwin* /usr/bin/freebsd* /usr/bin/openbsd* /usr/bin/windows* \
&& rm -rf /usr/lib/go/bin/darwin* /usr/lib/go/bin/freebsd* /usr/lib/go/bin/openbsd* /usr/lib/go/bin/windows* \
&& rm -rf /var/cache/apk/*
ENV GOPATH=/go PATH=$GOPATH/bin:$PATH
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
WORKDIR $GOPATH
RUN go env \
&& mkdir -p $GOPATH/src/golang.org/x $GOPATH/src/google.golang.org \
&& cd $GOPATH/src/golang.org/x \
&& git clone git://github.com/golang/crypto.git \
&& git clone git://github.com/golang/net.git \
&& git clone git://github.com/golang/oauth2.git \
&& cd $GOPATH/src/google.golang.org \
&& git clone git://github.com/google/go-genproto.git genproto \
&& git clone -qb v1.3.0 git://github.com/grpc/grpc-go.git grpc \
&& cd $GOPATH/src \
&& go get github.com/gin-gonic/contrib/sentry \
&& go get github.com/golang/protobuf/proto \
&& go get github.com/golang/glog \
&& go get gopkg.in/vmihailenco/msgpack.v2 \
&& go get github.com/xxtea/xxtea-go/xxtea \
&& go get github.com/bcho/bearychat \
&& go get github.com/rainycape/memcache \
&& go get gopkg.in/check.v1 \
&& go get github.com/stretchr/testify \
&& rm -rf $GOPATH/pkg
# for local dev
RUN mkdir -p $GOPATH/src/lcgc/platform \
&& cd $GOPATH/src/lcgc/platform \
&& git clone git://github.com/wealthworks/envflagset.git \
&& go get github.com/statsd/client-interface \
&& go get github.com/statsd/client \
&& go get github.com/wealthworks/grace \
&& mkdir -p $GOPATH/src/gopkg.in/go-pg \
&& cd $GOPATH/src/gopkg.in \
&& git clone -qb v4 git://github.com/liut/pg.git pg.v4 \
&& git clone -qb v5 git://github.com/liut/pg.git pg.v5 \
&& cd $GOPATH/src/gopkg.in/go-pg \
&& git clone -qb v5 git://github.com/liut/sharding.git sharding.v5 \
&& go get gopkg.in/go-pg/sharding.v5 \
&& go get github.com/liut/osin-storage/storage \
&& go get github.com/mitchellh/mapstructure \
&& go get github.com/pquerna/otp \
&& rm -rf $GOPATH/pkg