summaryrefslogtreecommitdiff
path: root/Dockerfile
blob: d00bb4ede292d1a84471b44af71b61fd1f78b03a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
FROM alpine:latest
MAINTAINER mo@mokhan.ca

RUN apk update && \
  apk upgrade && \
  apk add git bash ruby nodejs yarn chromium nss freetype freetype-dev harfbuzz ca-certificates ttf-freefont && \
  gem install bundler:'~> 2.0' --no-document && \
  mkdir -p /code
RUN git clone https://github.com/sstephenson/bats.git /opt/bats && cd /opt/bats && ./install.sh /usr/local
WORKDIR /code
COPY . /code
RUN bundle install --jobs $(nproc) --without development && yarn install
RUN sed -i 's/{ headless: true }/{ headless: true, executablePath: "\/usr\/bin\/chromium-browser", args: ["--no-sandbox", "--disable-setuid-sandbox"] }/g' node_modules/mdpdf/src/index.js
CMD ["bundle", "exec", "rake"]