Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pôle IS
Outillage
prezbuilder
Commits
78834ada
Commit
78834ada
authored
May 03, 2020
by
Guillaume Perréal
Browse files
Ajoute un Dockerfile.
parent
f8c4e014
Changes
3
Hide whitespace changes
Inline
Side-by-side
.dockerignore
0 → 100644
View file @
78834ada
/node_modules
/public
/.?*
Dockerfile
0 → 100644
View file @
78834ada
ARG
NODE_VERSION=14
ARG
DEBIAN_RELEASE=buster
FROM
node:${NODE_VERSION}-${DEBIAN_RELEASE} AS builder
RUN
apt-get update
-yq
&&
apt-get
install
-yq
unzip xz-utils wget
RUN
mkdir
/src
ARG
REVEALJS_VERSION=v1.2.0
RUN
wget
-nv
-O
/tmp/reveal.js.zip https://gitlab.irstea.fr/pole-is/tools/reveal.js/-/archive/
${
REVEALJS_VERSION
}
/reveal.js-
${
REVEALJS_VERSION
}
.zip
\
&&
cd
src
\
&&
unzip /tmp/reveal.js.zip
\
&&
mv
reveal.js-
${
REVEALJS_VERSION
}
reveal.js
\
&&
cd
reveal.js
\
&&
./pleasew build :reveal.js
FROM
node:${NODE_VERSION}-${DEBIAN_RELEASE}
COPY
--from=builder /src/reveal.js/plz-out/gen/reveal.js /opt/reveal.js
RUN
apt-get update
-yq
\
&&
apt-get
install
-yq
--no-install-recommends
\
libappindicator3-1
\
libasound2
\
libatspi2.0-0
\
libgtk-3-0
\
libnotify4
\
libnss3
\
libsecret-1-0
\
libx11-xcb1
\
libxss1
\
libxtst6
\
wget
\
xdg-utils
\
xfonts-75dpi
\
xfonts-base
\
&&
find /var/
*
/apt
-type
f
-delete
ARG
PANDOC_VERSION=2.9.2.1
RUN
wget
-nv
-O
/tmp/pandoc.tar.gz https://github.com/jgm/pandoc/releases/download/
${
PANDOC_VERSION
}
/pandoc-
${
PANDOC_VERSION
}
-linux-amd64
.tar.gz
\
&&
cd
/usr/local
\
&&
tar
xfz /tmp/pandoc.tar.gz
--strip-components
=
1
\
&&
rm
/tmp/pandoc.tar.gz
\
&&
pandoc
--version
ARG
DRAWIO_VERSION=13.0.3
RUN
wget
-nv
-O
/tmp/draw.io.deb https://github.com/jgraph/drawio-desktop/releases/download/v
${
DRAWIO_VERSION
}
/draw.io-amd64-
${
DRAWIO_VERSION
}
.deb
\
&&
dpkg
-i
/tmp/draw.io.deb
\
&&
rm
/tmp/draw.io.deb
ARG
WKHTMLTOPDF_VERSION=0.12.5
ARG
DEBIAN_RELEASE=buster
RUN
wget
-nv
-O
/tmp/wkhtmltox.deb https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/
${
WKHTMLTOPDF_VERSION
}
/wkhtmltox_
${
WKHTMLTOPDF_VERSION
}
-1
.
${
DEBIAN_RELEASE
}
_amd64.deb
\
&&
dpkg
-i
/tmp/wkhtmltox.deb
\
&&
rm
/tmp/wkhtmltox.deb
\
&&
wkhtmltopdf
--version
RUN
mkdir
-p
/src /opt/prezbuilder
COPY
src/ /src/
COPY
assets/ /opt/prezbuilder/assets/
COPY
lib/ /opt/prezbuilder/lib/
COPY
gulpfile.esm.js package.json package-lock.json /opt/prezbuilder/
ENV
NODE_ENV=production
RUN
cd
/opt/prezbuilder/
\
&&
ls
-la
\
&&
NPM_CONFIG_CACHE
=
/tmp/.npm npm
install
\\
&& rm -rf /tmp/.npm
ENV
SERVER_HOST=0.0.0.0 \
SERVER_PORT=3000 \
SRC=/src \
OUTPUT=/public \
WKHTMLTOPDF_BINARY=/usr/local/bin/wkhtmltopdf \
DRAWIO_BINARY=/opt/draw.io/drawio
RUN
mkdir
-p
-m
0777
$OUTPUT
WORKDIR
/opt/prezbuilder
EXPOSE
3000/tcp 35729/tcp
ENTRYPOINT
["/opt/prezbuilder/node_modules/.bin/gulp"]
CMD
["dev"]
package.json
View file @
78834ada
{
{
"name"
:
"prezbuilder"
,
"name"
:
"prezbuilder"
,
"version"
:
"1.0.0"
,
"version"
:
"1.0.0"
,
"description"
:
"Build INRAE-themed reveal.js presentatiokns."
,
"description"
:
"Build INRAE-themed reveal.js presentations."
,
"main"
:
"index.js"
,
"scripts"
:
{
"scripts"
:
{
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
,
"build"
:
"gulp build"
,
"build"
:
"gulp build"
,
"dev"
:
"gulp dev"
,
"dev"
:
"gulp dev"
,
"lint"
:
"eslint --color ."
"lint"
:
"eslint --color ."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment