summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2019-09-02 10:46:54 -0600
committermo khan <mo.khan@gmail.com>2019-09-02 10:46:54 -0600
commit6fbb0124de839147705bb6d78b42d0862d53660c (patch)
tree49e248c0baa3a0394cf486d4b2400e1375048f0f
parent824e860524105c920ff9da6fa8cceab308739452 (diff)
allow pdf generation from within alpine image
-rw-r--r--.dockerignore1
-rw-r--r--.gitlab-ci.yml1
-rw-r--r--Dockerfile3
3 files changed, 3 insertions, 2 deletions
diff --git a/.dockerignore b/.dockerignore
index a5348b2..a54807f 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -5,3 +5,4 @@ node_modules
*.pdf
pkg
*.class
+Dockerfile
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a6e82c1..555804c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -33,7 +33,6 @@ tarball:
image: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
stage: release
script:
- - yarn install
- bundle exec rake publish
artifacts:
paths:
diff --git a/Dockerfile b/Dockerfile
index 3dfd537..26f6b22 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,10 +3,11 @@ MAINTAINER mo@mokhan.ca
RUN apk update && \
apk upgrade && \
- apk add openjdk8 maven ruby nodejs yarn && \
+ apk add openjdk8 maven ruby nodejs yarn chromium nss freetype freetype-dev harfbuzz ca-certificates ttf-freefont && \
gem install bundler:'~> 2.0' --no-document && \
mkdir -p /code
WORKDIR /code
COPY . /code
RUN bundle install --jobs $(nproc) && yarn install && mvn 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