Skip to content
Snippets Groups Projects
Commit 201944ec authored by jurgenhaas's avatar jurgenhaas
Browse files

Improve permissions

Add support for optional custom theme
Instal more libs for PDF creation
parent 2a0d60c1
Branches
Tags
No related merge requests found
Pipeline #41140 passed
...@@ -11,7 +11,12 @@ RUN echo "Adding system components" && \ ...@@ -11,7 +11,12 @@ RUN echo "Adding system components" && \
apt-get update -y && \ apt-get update -y && \
DEBIAN_FRONTEND=noninteractive \ DEBIAN_FRONTEND=noninteractive \
apt-get install -y -q \ apt-get install -y -q \
autoconf automake curl g++ gcc jq make npm unzip && \ autoconf automake curl g++ gcc jq make npm rsync unzip \
ca-certificates fonts-liberation libappindicator3-1 libasound2 libatk-bridge2.0-0 libatk1.0-0 \
libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 \
libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 \
libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 \
libxss1 libxtst6 lsb-release wget xdg-utils && \
curl -L -o pandoc.deb https://github.com/jgm/pandoc/releases/download/2.9.2.1/pandoc-2.9.2.1-1-amd64.deb && \ curl -L -o pandoc.deb https://github.com/jgm/pandoc/releases/download/2.9.2.1/pandoc-2.9.2.1-1-amd64.deb && \
dpkg -i pandoc.deb && \ dpkg -i pandoc.deb && \
rm pandoc.deb rm pandoc.deb
...@@ -21,7 +26,10 @@ ADD bin/* /usr/local/bin/ ...@@ -21,7 +26,10 @@ ADD bin/* /usr/local/bin/
RUN echo "Setup MdShow" && \ RUN echo "Setup MdShow" && \
mdshow setup && \ mdshow setup && \
ln -s /opt/mdshow/reveal.js/node_modules/gulp/bin/gulp.js /usr/bin/gulp && \ ln -s /opt/mdshow/reveal.js/node_modules/gulp/bin/gulp.js /usr/bin/gulp && \
mkdir -p /opt/mdshow/theme && \
chmod -R a+rwx /opt/mdshow && \ chmod -R a+rwx /opt/mdshow && \
chmod -R a+rwx /opt/mdshow/reveal.js/css/theme/source && \
chmod -R a+rwx /opt/mdshow/reveal.js/dist/theme && \
\ \
echo "Cleanup" && \ echo "Cleanup" && \
apt-get clean && \ apt-get clean && \
......
#!/usr/bin/make -f #!/usr/bin/make -f
# TODO: newer versions of env support this: !/usr/bin/env -S make -f # TODO: newer versions of env support this: !/usr/bin/env -S make -f
# NOTE JH: switched for yarn npm, because yarn does not install node_modules/node-jp/bin # NOTE JH: switched from yarn to npm, because yarn does not install node_modules/node-jp/bin
# Author: Jan Christoph Ebersbach <jceb@e-jc.de> # Author: Jan Christoph Ebersbach <jceb@e-jc.de>
# Copyright (c) 2020 Jan Christoph Ebersbach # Copyright (c) 2020 Jan Christoph Ebersbach
# License: Apache-2.0 # License: Apache-2.0
...@@ -138,6 +138,7 @@ sass: $(MDSHOW_CONFIG)/reveal.js \ ...@@ -138,6 +138,7 @@ sass: $(MDSHOW_CONFIG)/reveal.js \
.sync-custom-themes: $(wildcard $(MDSHOW_CONFIG)/theme/*/source/*.scss) .sync-custom-themes: $(wildcard $(MDSHOW_CONFIG)/theme/*/source/*.scss)
@[ -n "$^" ] && rsync -u $^ $(MDSHOW_CONFIG)/reveal.js/css/theme/source/ || true @[ -n "$^" ] && rsync -u $^ $(MDSHOW_CONFIG)/reveal.js/css/theme/source/ || true
@[ -n "$^" ] && cd $(MDSHOW_CONFIG)/reveal.js && gulp css-themes || true
.SECONDEXPANSION: .SECONDEXPANSION:
.build-themes: $$(addprefix $(MDSHOW_CONFIG)/reveal.js/dist/theme/,$$(addsuffix .css,$$(basename $$(notdir $$(wildcard $(MDSHOW_CONFIG)/reveal.js/css/theme/source/*.scss))))) .build-themes: $$(addprefix $(MDSHOW_CONFIG)/reveal.js/dist/theme/,$$(addsuffix .css,$$(basename $$(notdir $$(wildcard $(MDSHOW_CONFIG)/reveal.js/css/theme/source/*.scss)))))
...@@ -152,7 +153,7 @@ $(MDSHOW_CONFIG)/theme/%/assets: ...@@ -152,7 +153,7 @@ $(MDSHOW_CONFIG)/theme/%/assets:
mkdir -p $@ mkdir -p $@
$(MDSHOW_CONFIG)/reveal.js/dist/theme/%: $(MDSHOW_CONFIG)/theme/%/assets $(MDSHOW_CONFIG)/reveal.js/dist/theme/%: $(MDSHOW_CONFIG)/theme/%/assets
ln -s $< $@ @cp $@.css $<
# {{{1 themes # {{{1 themes
themes: $(MDSHOW_CONFIG)/reveal.js/dist $(wildcard $(MDSHOW_CONFIG)/reveal.js/dist/theme/*.css) themes: $(MDSHOW_CONFIG)/reveal.js/dist $(wildcard $(MDSHOW_CONFIG)/reveal.js/dist/theme/*.css)
......
#!/bin/bash #!/bin/bash
docker run --user=$(id -u) --rm -it --net=host --volume=$(pwd):/mdshow --workdir=/mdshow registry.lakedrops.com/docker/mdshow mdshow $@ if [[ -n $MDSHOW_THEME_PATH ]]; then
THEME=--volume=${MDSHOW_THEME_PATH}:/opt/mdshow/theme/$(basename ${MDSHOW_THEME_PATH})
fi
docker run --user=$(id -u) --rm -it --net=host ${THEME} --volume=$(pwd):/mdshow --workdir=/mdshow registry.lakedrops.com/docker/mdshow mdshow $@
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment