FROM ruby:2.5.1-alpine3.7

ARG SIDEKIQ_PRO_KEY

RUN apk --no-cache add build-base

ADD . /opt/matterhorn
WORKDIR /opt/matterhorn
RUN make install

# Run tests; TODO: rewrite this config so we can run tests in a separate build step
RUN make test

EXPOSE 8080

ENTRYPOINT ["make"]
