2015-03-20 04:39:31 +01:00
|
|
|
# vim: ft=dockerfile
|
|
|
|
FROM golang
|
|
|
|
MAINTAINER Jimmy Zelinskie <jimmyzelinskie@gmail.com>
|
|
|
|
|
|
|
|
# Add files
|
|
|
|
WORKDIR /go/src/github.com/chihaya/chihaya/
|
|
|
|
RUN mkdir -p /go/src/github.com/chihaya/chihaya/
|
2015-07-01 04:27:05 +02:00
|
|
|
|
|
|
|
# Dependencies
|
|
|
|
RUN go get github.com/tools/godep
|
|
|
|
ADD Godeps /go/src/github.com/chihaya/chihaya/Godeps
|
|
|
|
RUN godep restore
|
|
|
|
|
|
|
|
# Add source
|
|
|
|
ADD *.go /go/src/github.com/chihaya/chihaya/
|
2015-10-24 21:40:23 +02:00
|
|
|
ADD api /go/src/github.com/chihaya/chihaya/api
|
2015-03-20 04:39:31 +01:00
|
|
|
ADD cmd /go/src/github.com/chihaya/chihaya/cmd
|
|
|
|
ADD config /go/src/github.com/chihaya/chihaya/config
|
|
|
|
ADD http /go/src/github.com/chihaya/chihaya/http
|
|
|
|
ADD stats /go/src/github.com/chihaya/chihaya/stats
|
|
|
|
ADD tracker /go/src/github.com/chihaya/chihaya/tracker
|
2015-07-01 04:27:05 +02:00
|
|
|
ADD udp /go/src/github.com/chihaya/chihaya/udp
|
2015-03-20 04:39:31 +01:00
|
|
|
|
|
|
|
# Install
|
2015-07-01 04:27:05 +02:00
|
|
|
RUN go install github.com/chihaya/chihaya/cmd/chihaya
|
2015-03-20 04:39:31 +01:00
|
|
|
|
2016-01-07 20:28:31 +01:00
|
|
|
# Configuration/environment
|
2015-03-20 04:39:31 +01:00
|
|
|
VOLUME ["/config"]
|
2016-01-07 20:28:31 +01:00
|
|
|
EXPOSE 6880-6882
|
|
|
|
|
2016-01-08 21:39:04 +01:00
|
|
|
# docker run -p 6880-6882:6880-6882 -v $PATH_TO_DIR_WITH_CONF_FILE:/config:ro -e quay.io/jzelinskie/chihaya:latest -v=5
|
|
|
|
ENTRYPOINT ["chihaya", "-config=/config/config.json", "-logtostderr=true"]
|
|
|
|
CMD ["-v=5"]
|