tail/Dockerfile

20 lines
485 B
Docker
Raw Normal View History

FROM golang
2013-09-09 11:04:39 +08:00
2015-09-30 22:48:17 +08:00
RUN mkdir -p $GOPATH/src/github.com/hpcloud/tail/
ADD . $GOPATH/src/github.com/hpcloud/tail/
2013-09-09 11:04:39 +08:00
# expecting to fetch dependencies successfully.
2015-09-30 22:48:17 +08:00
RUN go get -v github.com/hpcloud/tail
2013-09-09 11:04:39 +08:00
# expecting to run the test successfully.
2015-09-30 22:48:17 +08:00
RUN go test -v github.com/hpcloud/tail
2013-09-09 11:04:39 +08:00
2013-09-09 11:20:08 +08:00
# expecting to install successfully
2015-09-30 22:48:17 +08:00
RUN go install -v github.com/hpcloud/tail
RUN go install -v github.com/hpcloud/tail/cmd/gotail
2013-09-09 11:20:08 +08:00
RUN $GOPATH/bin/gotail -h || true
ENV PATH $GOPATH/bin:$PATH
CMD ["gotail"]