From 2e74e71ab9f1707bb2e442fa33c3680ab0215e86 Mon Sep 17 00:00:00 2001 From: Andrew Hosgood Date: Wed, 4 Dec 2024 09:18:50 +0000 Subject: [PATCH] Move Poetry and npm installs to Dockerfile rather than dev startup script --- docker/tna-python-dev/Dockerfile | 7 +++++++ docker/tna-python-dev/bin/dev | 5 +---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docker/tna-python-dev/Dockerfile b/docker/tna-python-dev/Dockerfile index 173d5d8..f4e3f8c 100644 --- a/docker/tna-python-dev/Dockerfile +++ b/docker/tna-python-dev/Dockerfile @@ -45,4 +45,11 @@ ENV PATH="/home/app/.local/bin/tasks:/home/app/.local/bin/dev:$PATH" # ========================================== COPY --chown=app lib/* /home/app/ +# ========================================== +# Install the tools required for linting and +# fixing both Python and JS/CSS code +# ========================================== +RUN python -m pip install --quiet black==24.10.0 flake8==7.1.0 isort==5.13.2; \ + npm install -g prettier@3.3.3 eslint@8.56.0 stylelint@16.10.0 stylelint-config-standard-scss@13.1.0 stylelint-selector-bem-pattern@4.0.1 + CMD ["dev"] diff --git a/docker/tna-python-dev/bin/dev b/docker/tna-python-dev/bin/dev index 4b3f664..9357ec3 100755 --- a/docker/tna-python-dev/bin/dev +++ b/docker/tna-python-dev/bin/dev @@ -1,9 +1,6 @@ #!/bin/bash poetry install --no-root --with dev || true -python -m pip install --quiet black==24.10.0 flake8==7.1.0 isort==5.13.2 - -cd /app || return . "$HOME/.nvm/nvm.sh" if [ -f "/app/.nvmrc" ] @@ -12,7 +9,7 @@ then else nvm use default fi -npm install -g prettier@3.3.3 eslint@8.56.0 stylelint@16.10.0 stylelint-config-standard-scss@13.1.0 stylelint-selector-bem-pattern@4.0.1 +npm install if [ -d "/home/app/.local/bin/tasks" ] then