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
15 changes: 4 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
FROM python:3.11

ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

RUN apt-get update && apt-get -y install --no-install-recommends bats gcc \
git \
git-lfs \
Expand All @@ -14,8 +10,7 @@ RUN apt-get update && apt-get -y install --no-install-recommends bats gcc \
libjpeg-dev \
libpng-dev \
libz-dev \
&& pip install --upgrade pip \
&& pip install --no-cache-dir mkdocs-material mike pillow cairosvg
vim

WORKDIR /tmp
COPY mkdocs_simple_plugin mkdocs_simple_plugin
Expand All @@ -24,11 +19,9 @@ COPY VERSION VERSION
COPY setup.py setup.py
COPY pyproject.toml pyproject.toml

RUN pip install --no-cache-dir . \
&& rm -rf /tmp/*

RUN git config --global --add safe.directory /docs &&\
git config --global --add safe.directory /site
RUN pip install --upgrade pip \
&& pip install --no-cache-dir . \
&& pip install --no-cache-dir mkdocs-material mike pillow cairosvg

WORKDIR /docs

Expand Down
8 changes: 7 additions & 1 deletion docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
#!/bin/bash
set -e

git config --global --add safe.directory /docs

if [ -f "requirements.txt" ]; then
pip install -r requirements.txt
if [ "$UID" -eq 0 ]; then
pip install -r requirements.txt
else
pip install --user -r requirements.txt
fi
fi

exec "$@"