gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-deployment] branch master updated: Conversion format from Bash to


From: gnunet
Subject: [taler-deployment] branch master updated: Conversion format from Bash to Docker: docs.git - Isolated
Date: Mon, 30 Jan 2023 12:32:30 +0100

This is an automated email from the git hooks/post-receive script.

javier-sepulveda pushed a commit to branch master
in repository deployment.

The following commit(s) were added to refs/heads/master by this push:
     new fc8b09c  Conversion format from Bash to Docker: docs.git - Isolated
fc8b09c is described below

commit fc8b09c5fef9d31b8fb2907989ab79f1a44535f0
Author: Javier Sepulveda <javier.sepulveda@uv.es>
AuthorDate: Mon Jan 30 12:30:31 2023 +0100

    Conversion format from Bash to Docker: docs.git - Isolated
---
 docker/docs-build/Dockerfile       | 24 ++++++++++++++++++++++--
 docker/docs-build/build.sh         |  2 +-
 docker/docs-build/requirements.txt |  1 -
 docker/docs-build/run.sh           | 26 ++++++--------------------
 4 files changed, 29 insertions(+), 24 deletions(-)

diff --git a/docker/docs-build/Dockerfile b/docker/docs-build/Dockerfile
index fe61794..5bcddce 100644
--- a/docker/docs-build/Dockerfile
+++ b/docker/docs-build/Dockerfile
@@ -1,7 +1,27 @@
+# Stage 1
+
+FROM debian:bookworm-slim AS repo
+
+RUN apt update \
+ && apt install --no-install-recommends -y ca-certificates git
+
+RUN git clone --branch=master --depth=1 https://git.taler.net/docs.git
+
+# Final image
+
 FROM sphinxdoc/sphinx-latexpdf
 
+# Copy content from one container to the other
+
 WORKDIR /docs
 
-ADD requirements.txt /docs
+COPY --from=repo /docs .
+
+# Install dependencies
+
+RUN python3 -m pip install --no-cache-dir recommonmark
+
+# Compile /docs/*
+
+ENTRYPOINT ["make", "BUILDDIR=/output", "-C", "/docs", "html", "latexpdf"]
 
-RUN pip3 install -r requirements.txt
diff --git a/docker/docs-build/build.sh b/docker/docs-build/build.sh
index 91182b2..0289932 100755
--- a/docker/docs-build/build.sh
+++ b/docker/docs-build/build.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 set -eu
 
diff --git a/docker/docs-build/requirements.txt 
b/docker/docs-build/requirements.txt
deleted file mode 100644
index 02bf565..0000000
--- a/docker/docs-build/requirements.txt
+++ /dev/null
@@ -1 +0,0 @@
-recommonmark
diff --git a/docker/docs-build/run.sh b/docker/docs-build/run.sh
index 33ba8a1..9f2eba6 100755
--- a/docker/docs-build/run.sh
+++ b/docker/docs-build/run.sh
@@ -1,28 +1,14 @@
-#!/bin/sh
+#!/bin/bash
 
 set -eu
 
-# Instead of git clone, use this pre-built function
+#  Execute the dockerfile, and leave output in local system
 
-fetch () {
-  git clean -fdx
-  git fetch
-  # reset to updated upstream branch, but only if we're tracking a branch
-  branch=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || 
echo head)
-  git reset --hard "$branch"
-}
+docker run -v /home/docbuilder/docs:/output taler-docs-image 
 
-cd /home/docbuilder/docs/
+# COPY data from volume to local
 
-fetch 
+cp -r /home/docbuilder/docs/html/* /home/docbuilder/build/docs/html
+cp -r /home/docbuilder/docs/latex/*.pdf /home/docbuilder/build/docs/pdf
 
-# Execute the container 2 times, and compile html and Latex pdf files
 
-docker run -v /home/docbuilder/docs:/docs taler-docs-image make html
-
-docker run -v /home/docbuilder/docs:/docs taler-docs-image make latexpdf
-
-# COPY data from container volume -> to the server (html and pdf files)
-
-cp -r _build/html/* /home/docbuilder/build/docs/html
-cp -r _build/latex/*.pdf /home/docbuilder/build/docs/pdf

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]