Commit 843a0163 authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

Utilise un submodule Git pour construire l'image.

parent c3f9ff6b
No related merge requests found
Showing with 180 additions and 127 deletions
+180 -127
......@@ -2,3 +2,4 @@
/dist/
/node_modules/
/.?*
.git
stages:
- build
variables:
GIT_SUBMODULE_STRATEGY: recursive
build:
image: gitlab-registry.irstea.fr/pole-is/docker/docker-ci:dind
tags: [dind]
......
.gitmodules 0 → 100644
[submodule "external/reveal.js"]
path = external/reveal.js
url = ../reveal.js
update = checkout
branch = irstea
shallow = true
FROM node
RUN mkdir -p /src /dist /reveal_js
RUN ln -snf /src /reveal_js/src
RUN ln -snf /dist /reveal_js/dist
FROM node:10 AS builder
RUN umask 0044
COPY package*.json /reveal_js/
RUN mkdir -p /reveal_js
COPY package*.json external Gruntfile.js /reveal_js/
WORKDIR /reveal_js
......@@ -16,12 +14,23 @@ ARG PANDOC_VERSION=2.7.3
ADD https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-linux.tar.gz /tmp/pandoc.tar.gz
RUN tar xvfz /tmp/pandoc.tar.gz -C /usr/local --strip-components=1 \
&& rm /tmp/pandoc.tar.gz
RUN tar xvfz /tmp/pandoc.tar.gz -C /usr/local --strip-components=1
RUN chmod -R +rX /reveal_js/node_modules/.bin/* /usr/local/bin/*
FROM node:10
COPY . /reveal_js
COPY --from=builder /reveal_js /reveal_js/
COPY --from=builder /usr/local/bin/* /usr/local/bin/
RUN mkdir -p /src /dist
RUN ln -snf /src /reveal_js/src
RUN ln -snf /dist /reveal_js/dist
WORKDIR /reveal_js
RUN chmod -R +rX /reveal_js /usr/local
RUN pandoc --version
RUN node_modules/.bin/grunt --version
EXPOSE 80/tcp 8899/tcp
......
Subproject commit a21b758e7fcd612d541bbcbbd978a7d20f1f8108
This diff is collapsed.
......@@ -27,13 +27,13 @@
"grunt-http-server": "^2.1.0",
"grunt-watcher": "^1.0.0",
"readdirp": "^3.2.0",
"reveal.js": "git+https://gitlab.irstea.fr/guillaume.perreal/reveal.js.git#irstea"
"reveal.js": "file://./external/reveal.js"
},
"devDependencies": {
"husky": "^1.3.1",
"lint-staged": "^8.2.1",
"load-grunt-tasks": "^5.1.0",
"prettier": "^6.5.1"
"prettier": "^1.19.0"
},
"husky": {
"pre-commit": "lint-staged"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment