install chrome headless and generate BreeLaPointeResume.pdf from homebrew live
parent
52b7176c69
commit
3062630e1d
|
|
@ -5,7 +5,7 @@ FROM andreysenov/firebase-tools:latest
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
RUN echo installing dependencies...
|
RUN echo installing dependencies...
|
||||||
RUN apt -y install git woff2 bash
|
RUN apt update && apt -y install git woff2 bash && (wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - && echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a /etc/apt/sources.list.d/google.list && (sudo apt update; sudo apt --fix-broken install; sudo apt -y install google-chrome-stable))
|
||||||
|
|
||||||
RUN echo copying vale...
|
RUN echo copying vale...
|
||||||
COPY --from=vale /bin/vale /bin/vale
|
COPY --from=vale /bin/vale /bin/vale
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,22 @@ trap cleanup EXIT
|
||||||
rm -rf $outdir
|
rm -rf $outdir
|
||||||
mkdir -p $outdir/public
|
mkdir -p $outdir/public
|
||||||
cp homebrew/homebrew.html $outdir/public/index.html
|
cp homebrew/homebrew.html $outdir/public/index.html
|
||||||
cp homebrew/homebrew.pdf $outdir/public/BreeLaPointeResume.pdf
|
|
||||||
cp -r ./homebrew/fonts $outdir/public/
|
cp -r ./homebrew/fonts $outdir/public/
|
||||||
|
if which google-chrome-stable; then
|
||||||
|
echo PRINTING PDF
|
||||||
|
google-chrome-stable \
|
||||||
|
--no-sandbox \
|
||||||
|
--headless \
|
||||||
|
--disable-gpu \
|
||||||
|
--print-to-pdf=$outdir/public/BreeLaPointeResume.pdf \
|
||||||
|
--run-all-compositor-stages-before-draw \
|
||||||
|
--no-pdf-header-footer \
|
||||||
|
$outdir/public/index.html
|
||||||
|
else
|
||||||
|
cp homebrew/homebrew.pdf $outdir/public/BreeLaPointeResume.pdf
|
||||||
|
fi
|
||||||
|
cat $outdir/public/BreeLaPointeResume.pdf | base64 | tr -d '\n'; echo
|
||||||
|
false
|
||||||
|
|
||||||
(
|
(
|
||||||
if ! which woff2_compress; then
|
if ! which woff2_compress; then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue