mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add a Dockerfile + yarn script for local build and serve of mkdocs with auto update enabled
This commit is contained in:
1 parent
058a32f5fb
commit
1bc96ef597
4 files changed
+53
-1
No files matched your search
@@ -0,0 +1,35 @@
|
||||
ARG PYTHON_VERSION=3.8.1-alpine3.11
|
||||
|
||||
FROM python:${PYTHON_VERSION} as builder
|
||||
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
# Set build directory
|
||||
WORKDIR /wheels
|
||||
|
||||
# Copy files necessary
|
||||
COPY ./requirements.txt .
|
||||
|
||||
# Perform build and cleanup artifacts
|
||||
RUN \
|
||||
apk add --no-cache \
|
||||
git \
|
||||
git-fast-import \
|
||||
&& apk add --no-cache --virtual .build gcc musl-dev \
|
||||
&& python -m pip install --upgrade pip \
|
||||
&& pip install -r requirements.txt \
|
||||
&& apk del .build gcc musl-dev \
|
||||
&& rm -rf /usr/local/lib/python3.8/site-packages/mkdocs/themes/*/* \
|
||||
&& rm -rf /tmp/*
|
||||
|
||||
|
||||
|
||||
# Set final MkDocs working directory
|
||||
WORKDIR /docs
|
||||
|
||||
# Expose MkDocs development server port
|
||||
EXPOSE 8000
|
||||
|
||||
# Start development server by default
|
||||
ENTRYPOINT ["mkdocs"]
|
||||
CMD ["serve", "--dev-addr=0.0.0.0:8000"]
|
||||
@@ -0,0 +1,4 @@
|
||||
# Direct dependencies
|
||||
mkdocs==1.1.2
|
||||
mkdocs-material==6.1.0
|
||||
mkdocs-git-revision-date-localized-plugin==0.7.3
|
||||
Reference in new issue
Block a user