2016-09-05 18:18:29 -04:00
|
|
|
FROM golang:alpine
|
|
|
|
MAINTAINER Jimmy Zelinskie <jimmyzelinskie@gmail.com>
|
|
|
|
|
2016-09-21 15:26:21 -04:00
|
|
|
# Install OS-level dependencies.
|
|
|
|
RUN apk update && \
|
|
|
|
apk add curl git && \
|
|
|
|
curl https://glide.sh/get | sh
|
2016-09-05 18:18:29 -04:00
|
|
|
|
2016-09-21 15:26:21 -04:00
|
|
|
# Copy our source code into the container.
|
2016-09-05 18:18:29 -04:00
|
|
|
WORKDIR /go/src/github.com/chihaya/chihaya
|
|
|
|
ADD . /go/src/github.com/chihaya/chihaya
|
2016-09-21 15:26:21 -04:00
|
|
|
|
|
|
|
# Install our golang dependencies and compile our binary.
|
2016-09-05 18:18:29 -04:00
|
|
|
RUN glide install
|
|
|
|
RUN go install github.com/chihaya/chihaya/cmd/chihaya
|
|
|
|
|
2016-10-21 23:00:20 -04:00
|
|
|
# Delete the compiler from the container.
|
|
|
|
# This makes the container much smaller when using Quay's squashing feature.
|
|
|
|
RUN rm -r /usr/local/go
|
|
|
|
|
2016-09-21 15:26:21 -04:00
|
|
|
# Expose a docker interface to our binary.
|
2016-09-05 18:18:29 -04:00
|
|
|
EXPOSE 6880 6881
|
|
|
|
ENTRYPOINT ["chihaya"]
|