diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..2f9a9a555 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,15 @@ +FROM python:3.9 as final + +USER root + +# Add dev tools needed for building +RUN export DEBIAN_FRONTEND=noninteractive \ + && apt-get update \ + && apt-get -y install --no-install-recommends \ + curl gnupg2 git nano make graphviz imagemagick inkscape sass unzip wget php-cli npm latexmk texlive-latex-extra tex-gyre \ + && wget https://getcomposer.org/installer -qO /tmp/composer-setup.php \ + && php /tmp/composer-setup.php \ + && mv composer.phar /usr/local/bin/composer \ + && npm install svgexport -g \ + && rm -f /tmp/composer-setup.php \ + && rm -rf /var/lib/apt/lists/* \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..ad5d0211a --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,16 @@ +// For format details, see https://aka.ms/devcontainer.json. +{ + "name": "Nextcloud documentation DevContainer", + "context": "..", + "dockerFile": "Dockerfile", + "containerUser": "root", + "customizations": { + "vscode": { + "extensions": [ + "tht13.rst-vscode", + "tomoki1207.pdf" + ] + } + }, + "postCreateCommand": "python3 -m pip install -r requirements.txt && python3 -m pip install sphinx-autobuild && cd build && composer install --ignore-platform-reqs" +} diff --git a/README.rst b/README.rst index 1ea0e71fb..82dfe872c 100644 --- a/README.rst +++ b/README.rst @@ -134,6 +134,16 @@ Building PDF 5. Install the dependencies `pip install -r requirements.txt` 6. Now you can use `make ...` to build all the stuff - for example `make pdf` to build the PDF flavor of all manuals +Using the VSCode DevContainer +============================= + +This repository contains a full-featured `VSCode DevContainer `_. +You can use it in your local development environment or via `GitHub Codespaces `_. +Just open the container an use one of the commands from above to build the project. For example ``make`` to build the full +documentaion, ``make html`` to build the HTML documentaion or ``make pdf`` to build the PDF documentation. You can also use +``make SPHINXBUILD=sphinx-autobuild html`` in combination with `port forwarding `_ +to watch file changes and automatically reload the html preview. + Icons -----