From c411bf2594e2e2fa5f7d08eae02c3abb345ed1f2 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Sun, 13 Aug 2023 12:01:55 +0300 Subject: [PATCH 1/2] docker: remove build targets and dockerfiles for releases Stop doing release docker images. Nobody seems to need them. --- CHANGELOG.rst | 1 + docker/Makefile.local | 24 ------------------------ docker/base/Dockerfile | 23 ----------------------- docker/latexpdf/Dockerfile | 38 -------------------------------------- 4 files changed, 1 insertion(+), 85 deletions(-) delete mode 100644 docker/base/Dockerfile delete mode 100644 docker/latexpdf/Dockerfile diff --git a/CHANGELOG.rst b/CHANGELOG.rst index cf31d62c..36205396 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -24,6 +24,7 @@ Removed ~~~~~~~ * Development dependency on the deprecated ``sphinx_testing`` package +* Docker containers Fixed ~~~~~ diff --git a/docker/Makefile.local b/docker/Makefile.local index 371f7c85..17e385e8 100644 --- a/docker/Makefile.local +++ b/docker/Makefile.local @@ -27,28 +27,4 @@ docker-test-html: docker-test-build mkdir -p doc/_build docker run $(DOCKER_TEST_OUT_MOUNT) $(DOCKER_TEST_TAG) make BUILDDIR=/out html -# Containers for release -DOCKER_MAIN_REPO = jnikula/hawkmoth -DOCKER_LATEXPDF_REPO = jnikula/hawkmoth-latexpdf - -.PHONY: docker-build docker-push -docker-build: - docker build --build-arg HAWKMOTH_VERSION=$(HAWKMOTH_VERSION) --file $(docker_dir)/base/Dockerfile --tag $(DOCKER_MAIN_REPO) --tag $(DOCKER_MAIN_REPO):$(HAWKMOTH_VERSION) $(docker_dir)/base - -docker-push: docker-build - docker push --all-tags $(DOCKER_MAIN_REPO) - -docker-latexpdf-build: - docker build --build-arg HAWKMOTH_VERSION=$(HAWKMOTH_VERSION) --file $(docker_dir)/latexpdf/Dockerfile --tag $(DOCKER_LATEXPDF_REPO) --tag $(DOCKER_LATEXPDF_REPO):$(HAWKMOTH_VERSION) $(docker_dir)/latexpdf - -docker-latexpdf-push: docker-latexpdf-build - docker push --all-tags $(DOCKER_LATEXPDF_REPO) - -# Build Hawkmoth documentation using the container -docker-html: docker-build - docker run --rm -v $(PWD):/docs $(DOCKER_MAIN_REPO) make html - -docker-latexpdf: docker-latexpdf-build - docker run --rm -v $(PWD):/docs $(DOCKER_LATEXPDF_REPO) make latexpdf - CLEAN := $(CLEAN) $(HAWKMOTH_ARCHIVE) diff --git a/docker/base/Dockerfile b/docker/base/Dockerfile deleted file mode 100644 index 50de6e9e..00000000 --- a/docker/base/Dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -# Based on https://github.com/sphinx-doc/docker -FROM debian:bullseye -LABEL maintainer="Jani Nikula " - -ARG HAWKMOTH_VERSION - -WORKDIR /docs -RUN apt-get update \ - && apt-get install --no-install-recommends -y \ - graphviz \ - imagemagick \ - make \ - \ - python3-clang \ - python3-pip \ - && apt-get autoremove \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -RUN python3 -m pip install --no-cache-dir -U pip -RUN python3 -m pip install --no-cache-dir Sphinx==5.3.0 Pillow hawkmoth==$HAWKMOTH_VERSION - -CMD ["make", "html"] diff --git a/docker/latexpdf/Dockerfile b/docker/latexpdf/Dockerfile deleted file mode 100644 index f5389afb..00000000 --- a/docker/latexpdf/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -# Based on https://github.com/sphinx-doc/docker -FROM debian:bullseye -LABEL maintainer="Jani Nikula " - -ARG HAWKMOTH_VERSION - -WORKDIR /docs -RUN apt-get update \ - && apt-get install --no-install-recommends -y \ - graphviz \ - imagemagick \ - make \ - \ - latexmk \ - lmodern \ - fonts-freefont-otf \ - texlive-latex-recommended \ - texlive-latex-extra \ - texlive-fonts-recommended \ - texlive-fonts-extra \ - texlive-lang-cjk \ - texlive-lang-chinese \ - texlive-lang-japanese \ - texlive-luatex \ - texlive-xetex \ - xindy \ - tex-gyre \ - \ - python3-clang \ - python3-pip \ - && apt-get autoremove \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -RUN python3 -m pip install --no-cache-dir -U pip -RUN python3 -m pip install --no-cache-dir Sphinx==5.3.0 Pillow hawkmoth==$HAWKMOTH_VERSION - -CMD ["make", "latexpdf"] From 6b61470fd9fa26ab14824c4ee06c5a5304e8817e Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Sun, 13 Aug 2023 12:02:58 +0300 Subject: [PATCH 2/2] docs: remove docker documentation Stop doing release docker images. Nobody seems to need them. --- README.rst | 7 ------- doc/installation.rst | 30 ------------------------------ 2 files changed, 37 deletions(-) diff --git a/README.rst b/README.rst index 9a1b400a..7ee8ebdd 100644 --- a/README.rst +++ b/README.rst @@ -107,9 +107,6 @@ Alternatively, installation packages are available for: * `Arch Linux`_ -There are also Docker images `jnikula/hawkmoth`_ and -`jnikula/hawkmoth-latexpdf`_ at Docker Hub. - In Sphinx ``conf.py``, add ``hawkmoth`` to ``extensions``, and point ``hawkmoth_root`` at the source tree. See the extension documentation for details. @@ -118,10 +115,6 @@ details. .. _Arch Linux: https://aur.archlinux.org/packages/?K=hawkmoth -.. _jnikula/hawkmoth-latexpdf: https://hub.docker.com/repository/docker/jnikula/hawkmoth-latexpdf - -.. _jnikula/hawkmoth: https://hub.docker.com/repository/docker/jnikula/hawkmoth - Development and Contributing ---------------------------- diff --git a/doc/installation.rst b/doc/installation.rst index 801744b7..a339a6ab 100644 --- a/doc/installation.rst +++ b/doc/installation.rst @@ -79,36 +79,6 @@ the distro Clang package available to the virtual environment. For example: python3 -m venv --system-site-packages .venv -Docker ------- - -To run Sphinx and Hawkmoth using Docker, there are separate images with and -without Latex PDF support, `jnikula/hawkmoth-latexpdf`_ and `jnikula/hawkmoth`_, -respectively. If you don't need Latex PDF support, the latter is much smaller. - -The images are based on the official Sphinx Docker images -`sphinxdoc/sphinx-latexpdf`_ and `sphinxdoc/sphinx`_, and can be used -similarly. Just replace the image names. - -For example: - -.. code-block:: shell - - docker run --rm -v /path/to/document:/docs jnikula/hawkmoth make html - -To create your own custom images, please have a look at the ``docker`` directory -in the `Hawkmoth source repository`_ for a starting point. - -.. _jnikula/hawkmoth-latexpdf: https://hub.docker.com/repository/docker/jnikula/hawkmoth-latexpdf - -.. _jnikula/hawkmoth: https://hub.docker.com/repository/docker/jnikula/hawkmoth - -.. _sphinxdoc/sphinx-latexpdf: https://hub.docker.com/r/sphinxdoc/sphinx-latexpdf - -.. _sphinxdoc/sphinx: https://hub.docker.com/r/sphinxdoc/sphinx - -.. _Hawkmoth source repository: https://github.com/jnikula/hawkmoth - Read the Docs -------------