From d0fdf77b318bd78f5349973405b899ceb65fa1af Mon Sep 17 00:00:00 2001 From: sigmund Date: Thu, 8 Jan 2026 21:58:30 +0100 Subject: [PATCH 1/5] added a dockerfile with cvcreator support --- README.rst | 20 ++++++++++++++++++++ dockerfile | 27 +++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 dockerfile diff --git a/README.rst b/README.rst index 3b71f40..266e906 100644 --- a/README.rst +++ b/README.rst @@ -178,3 +178,23 @@ and deployed automatically when making a tagged released. To do so you need to: After merging to master, the workflow creates the tag and Github release for this version and uploads its wheel file to Pypi. + + +Docker +====== + +Cvcreator can also be run in a docker container. To build the container image, +run the following command from the repository root: + +.. code:: bash + + docker build -t cvcreator . + +Example usage of running cvcreator in the docker container: + +.. code:: bash + + docker run --rm -v $(pwd):/data cvcreator cv create /data/example.toml /data/my_cv.pdf + +This will mount the current working directory into the container at /data, and +run the cvcreator command to create a CV from example.toml to my_cv.pdf. \ No newline at end of file diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..6e9d76d --- /dev/null +++ b/dockerfile @@ -0,0 +1,27 @@ +# Start with a minimal TeX Live image as base and install other +# necessary packages separately to keep the image size small. +FROM texlive/texlive:latest-small + +# Install additional TeX Live collections for language support +RUN tlmgr update --self && \ + tlmgr install collection-langeuropean + +# Install Python and curl for uv installation +RUN apt-get update && \ + apt-get install -y python3 python3-pip curl && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +# Install uv (Because it is the best --- Fight me!) +RUN curl -LsSf https://astral.sh/uv/install.sh | sh +ENV PATH="/root/.local/bin:$PATH" + +# Set working directory +WORKDIR /app + +# Copy project files +COPY pyproject.toml README.rst ./ +COPY cvcreator ./cvcreator + +# Install project with dev dependencies using uv +RUN /root/.local/bin/uv pip install --system --break-system-packages -e ".[dev]" From 5a04b335a9c8f0f15fba9c41ffde0b4f26a62acb Mon Sep 17 00:00:00 2001 From: sigmund Date: Thu, 8 Jan 2026 22:04:58 +0100 Subject: [PATCH 2/5] updated to use venv instead of system. didn't like the break-package hack --- README.rst | 2 +- dockerfile | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 266e906..262004c 100644 --- a/README.rst +++ b/README.rst @@ -194,7 +194,7 @@ Example usage of running cvcreator in the docker container: .. code:: bash - docker run --rm -v $(pwd):/data cvcreator cv create /data/example.toml /data/my_cv.pdf + docker run --rm -v $(pwd):/data cvcreator create /data/example.toml /data/my_cv.pdf This will mount the current working directory into the container at /data, and run the cvcreator command to create a CV from example.toml to my_cv.pdf. \ No newline at end of file diff --git a/dockerfile b/dockerfile index 6e9d76d..dff803a 100644 --- a/dockerfile +++ b/dockerfile @@ -23,5 +23,11 @@ WORKDIR /app COPY pyproject.toml README.rst ./ COPY cvcreator ./cvcreator -# Install project with dev dependencies using uv -RUN /root/.local/bin/uv pip install --system --break-system-packages -e ".[dev]" +# Create virtual environment and install project with dev dependencies +RUN python3 -m venv /opt/venv +ENV PATH="/opt/venv/bin:$PATH" +RUN uv pip install -e ".[dev]" + +# Set the entrypoint to the cv command +ENTRYPOINT ["cv"] + From f85265d92357aee4d07a6cb594ddc0c87de2a4e3 Mon Sep 17 00:00:00 2001 From: sigmund Date: Thu, 8 Jan 2026 22:36:04 +0100 Subject: [PATCH 3/5] Some missing packages --- dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dockerfile b/dockerfile index dff803a..9c064cb 100644 --- a/dockerfile +++ b/dockerfile @@ -4,7 +4,8 @@ FROM texlive/texlive:latest-small # Install additional TeX Live collections for language support RUN tlmgr update --self && \ - tlmgr install collection-langeuropean + tlmgr install collection-langeuropean && \ + tlmgr install changepage enumitem multirow titlesec # Install Python and curl for uv installation RUN apt-get update && \ @@ -24,10 +25,10 @@ COPY pyproject.toml README.rst ./ COPY cvcreator ./cvcreator # Create virtual environment and install project with dev dependencies -RUN python3 -m venv /opt/venv +RUN uv venv /opt/venv ENV PATH="/opt/venv/bin:$PATH" RUN uv pip install -e ".[dev]" # Set the entrypoint to the cv command -ENTRYPOINT ["cv"] +ENTRYPOINT ["/opt/venv/bin/cv"] From 0b1076665ed8cb9952c26341a487ce92d2b8fed3 Mon Sep 17 00:00:00 2001 From: sigmund Date: Fri, 9 Jan 2026 16:38:08 +0100 Subject: [PATCH 4/5] updated readme with a better solution --- README.rst | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 262004c..1f6cff6 100644 --- a/README.rst +++ b/README.rst @@ -197,4 +197,17 @@ Example usage of running cvcreator in the docker container: docker run --rm -v $(pwd):/data cvcreator create /data/example.toml /data/my_cv.pdf This will mount the current working directory into the container at /data, and -run the cvcreator command to create a CV from example.toml to my_cv.pdf. \ No newline at end of file +run the cvcreator command to create a CV from example.toml to my_cv.pdf. + +if you want it even simpler (and always have to stand in the directory where your files are located), +you can create an alias in your shell configuration file like this: + +.. code:: bash + + alias cvcreator='docker run --rm -v $(pwd):/data cvcreator' + +Then you can run cvcreator commands as if it was installed on your system, e.g.: + +.. code:: bash + + cvcreator create /data/example.toml /data/my_cv.pdf \ No newline at end of file From d0a1447f91a2e8436e0615c5d4c0f9a7e6ed38ed Mon Sep 17 00:00:00 2001 From: Sigmund Slang Date: Fri, 16 Jan 2026 09:55:12 +0100 Subject: [PATCH 5/5] Update README.rst Co-authored-by: Alexander Fleischer --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 1f6cff6..422bca8 100644 --- a/README.rst +++ b/README.rst @@ -199,7 +199,7 @@ Example usage of running cvcreator in the docker container: This will mount the current working directory into the container at /data, and run the cvcreator command to create a CV from example.toml to my_cv.pdf. -if you want it even simpler (and always have to stand in the directory where your files are located), +If you want it even simpler (and always have to stand in the directory where your files are located), you can create an alias in your shell configuration file like this: .. code:: bash