Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,36 @@ 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 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.

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
34 changes: 34 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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 && \
tlmgr install changepage enumitem multirow titlesec

# 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

# Create virtual environment and install project with dev dependencies
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 ["/opt/venv/bin/cv"]