forked from SkygearIO/skygear-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-development
45 lines (36 loc) · 1.55 KB
/
Dockerfile-development
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
FROM golang:1.5
RUN \
apt-get update && \
apt-get install --no-install-recommends -y libtool-bin automake pkg-config && \
git clone --branch 1.0.5 --depth 1 git://github.com/jedisct1/libsodium.git && \
( cd libsodium; ./autogen.sh; ./configure; make check; make install; ldconfig ) && \
rm -rf libsodium && \
git clone --branch v4.1.3 --depth 1 git://github.com/zeromq/zeromq4-1.git && \
( cd zeromq4-1; ./autogen.sh; ./configure; make check; make install; ldconfig ) && \
rm -rf zeromq4-1 && \
git clone --branch v3.0.2 --depth 1 git://github.com/zeromq/czmq.git && \
( cd czmq; ./autogen.sh; ./configure; make check; make install; ldconfig ) && \
rm -rf czmq && \
apt-get install --no-install-recommends -y net-tools telnet && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /go/src/app
WORKDIR /go/src/app
# Copy a minimal set of files to restore Go dependencies to get advantage
# of Docker build cache
RUN go get github.com/tools/godep && \
go get golang.org/x/tools/cmd/stringer && \
go get golang.org/x/tools/cmd/cover && \
go get github.com/golang/lint/golint && \
go get github.com/smartystreets/goconvey/convey && \
go get github.com/smartystreets/assertions && \
go get github.com/golang/mock/gomock && \
go get github.com/golang/mock/mockgen && \
go get github.com/jarcoal/httpmock
COPY Godeps /go/src/app/Godeps
RUN $GOPATH/bin/godep restore
COPY . /go/src/app
RUN go-wrapper download && \
go-wrapper install --tags zmq
VOLUME /go/src/app/data
EXPOSE 3000
CMD ["go-wrapper", "run"]