tracker/Dockerfile
Jimmy Zelinskie c5af262d43 dockerfile: delete the compiler from the container
This drastically shrinks the size of the container when deploying using
Quay's squashed image support.

https://docs.quay.io/guides/squashed-images.html
2016-10-21 23:01:22 -04:00

23 lines
675 B
Docker

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