FROM golang:1.15 as build

ADD . /app
WORKDIR /app
ENV GOOS=linux
ENV CGO_ENABLED=0
RUN go build .

# ---

FROM busybox

COPY --from=build /app/viewercount /usr/local/bin/viewercount
CMD /usr/local/bin/viewercount
