From d8f117e9477fc049a14de79d672e1942dd2ae841 Mon Sep 17 00:00:00 2001 From: Benjamin Bach Date: Sat, 20 Aug 2022 00:37:34 +0200 Subject: [PATCH] Removes Makefile + double FROM in Dockerfile --- Dockerfile | 8 ++++---- Makefile | 12 ------------ docs/contributing.rst | 10 ++++------ 3 files changed, 8 insertions(+), 22 deletions(-) delete mode 100644 Makefile diff --git a/Dockerfile b/Dockerfile index 71534a873..cf89c503a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,4 @@ -# python:3-alpine contains node 18 so has to go first -# in order to get overwritten -FROM python:3-alpine +# This implicitely includes Python 3.10 FROM node:14-alpine # Do not use --update since that will also fetch the @@ -10,7 +8,9 @@ RUN apk add npm make py3-pip py3-wheel # Add an extra verification that we have the right node # because the above caused issues -RUN node -v && node -v | grep -q v14 +RUN python3 --version +RUN node -v && node -v | grep -q v14 &&\ + python3 --version && python3 --version | grep -q "3.10" RUN pip install pip --upgrade diff --git a/Makefile b/Makefile deleted file mode 100644 index 5a7757b92..000000000 --- a/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -SHELL := /bin/bash -CWD := $(shell cd -P -- '$(shell dirname -- "$0")' && pwd -P) - -docker-images: - docker-compose build - -docker-run: - docker-compose run sphinx_rtd_theme $(command) - -docker-copy-assets: - docker cp "$(shell cat .container_id):/project/sphinx_rtd_theme" . - docker cp "$(shell cat .container_id):/project/package-lock.json" . diff --git a/docs/contributing.rst b/docs/contributing.rst index 47858b4a7..d46631e97 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -82,18 +82,16 @@ Use the following steps: .. code-block:: console # Builds an updated version of the docker image - $ make docker-images + $ docker-compose build # Runs the docker environment and builds the assets. The container exits after completing the build. - $ make docker-run command=build + $ docker-compose run sphinx_rtd_theme build # Runs the development webserver - $ make docker-run command=dev + $ docker-compose run sphinx_rtd_theme dev -Every time you change the Node or Python requirements, you will need to rebuild images with ``make docker-images``. If you change SASS or JS, you will need to rebuild assets. - -If you need a different setup, refer to ``Makefile`` to see the exact method used to invoke the Docker environment. +Every time you change the Node or Python requirements, you will need to rebuild images with ``docker-compose run sphinx_rtd_theme build``. If you change SASS or JS, you will need to rebuild assets. Testing =======