En raison du déménagement des baies serveurs, les services gitlab.irstea.fr et mattermost.irstea.fr seront interrompus le samedi 2 octobre 2021 au matin. Ils devraient revenir à la normale dans la journée.

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

Retravaille l'image Docker.

parent bd0c3525
/node_modules *
/public .?*
/Dockerfile !assets/
/.?* !bin/prezbuilder
!gulpfile.esm.js/
!lib/
!package*.json
!templates/
...@@ -34,8 +34,7 @@ docker-image: ...@@ -34,8 +34,7 @@ docker-image:
script: script:
- set -x - set -x
- docker pull "${IMAGE}" || exit 0 - docker pull "${IMAGE}" || exit 0
- docker build --cache-from "node:buster-12,${IMAGE}" --tag "${IMAGE}" . - docker build --cache-from "${IMAGE}" --tag "${IMAGE}" .
- docker run --rm "${IMAGE}" build
- bash -x bin/prezbuilder-docker build src public - bash -x bin/prezbuilder-docker build src public
- "[ -e public/index.html ]" - "[ -e public/index.html ]"
- docker push "${IMAGE}" - docker push "${IMAGE}"
......
...@@ -41,21 +41,15 @@ RUN wget -nv -O /tmp/wkhtmltox.deb https://github.com/wkhtmltopdf/wkhtmltopdf/re ...@@ -41,21 +41,15 @@ RUN wget -nv -O /tmp/wkhtmltox.deb https://github.com/wkhtmltopdf/wkhtmltopdf/re
&& rm /tmp/wkhtmltox.deb \ && rm /tmp/wkhtmltox.deb \
&& wkhtmltopdf --version && wkhtmltopdf --version
RUN mkdir -p /src /opt/prezbuilder RUN mkdir -p /workdir/src /workdir/public /opt/prezbuilder
COPY --from=builder /opt/prezbuilder /opt/prezbuilder/ COPY --from=builder /opt/prezbuilder /opt/prezbuilder/
COPY src/ /src/
ENV SERVER_HOST=0.0.0.0 \ ENV SERVER_HOST=0.0.0.0 \
SERVER_PORT=3000 \ SERVER_PORT=3000 \
SRC=/src \
OUTPUT=/public \
WKHTMLTOPDF_BINARY=/usr/local/bin/wkhtmltopdf WKHTMLTOPDF_BINARY=/usr/local/bin/wkhtmltopdf
RUN mkdir -p -m 0777 $OUTPUT \ WORKDIR /workdir
&& ln -s /opt/prezbuilder/bin/prezbuilder /usr/local/bin/prezbuilder
WORKDIR /src
EXPOSE 3000/tcp 35729/tcp EXPOSE 3000/tcp 35729/tcp
ENTRYPOINT ["/usr/local/bin/prezbuilder"] ENTRYPOINT ["/opt/prezbuilder/bin/prezbuilder"]
CMD ["dev"] CMD ["dev"]
...@@ -3,9 +3,9 @@ exec docker run \ ...@@ -3,9 +3,9 @@ exec docker run \
--rm -t \ --rm -t \
--init \ --init \
-u `id -u`:`id -g` \ -u `id -u`:`id -g` \
-v `readlink -f ${2:-src}`:/src:ro \ -v `readlink -f ${2:-src}`:/workdir/src:ro \
-v `readlink -f ${3:-public}`:/public \ -v `readlink -f ${3:-public}`:/workdir/public \
-p 3000:3000/tcp \ -p 3000:3000/tcp \
-p 35729:35729/tcp \ -p 35729:35729/tcp \
"${PREZBUILDER_IMAGE:-gitlab-registry.irstea.fr/pole-is/tools/prezbuilder}:${PREZBUILDER_TAG:-master}" \ "${PREZBUILDER_IMAGE:-gitlab-registry.irstea.fr/pole-is/tools/prezbuilder}:${PREZBUILDER_TAG:-master}" \
"${1:-build}" /src /public "${1:-build}" /workdir/src /workdir/public
Markdown is supported
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