Skip to content

Commit

Permalink
Move Poetry and npm installs to Dockerfile rather than dev startup sc…
Browse files Browse the repository at this point in the history
…ript
  • Loading branch information
ahosgood committed Dec 4, 2024
1 parent 8f86305 commit 2e74e71
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 7 additions & 0 deletions docker/tna-python-dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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; \

Check failure on line 52 in docker/tna-python-dev/Dockerfile

View workflow job for this annotation

GitHub Actions / Python Dev

DL3042 warning: Avoid use of cache directory with pip. Use `pip install --no-cache-dir <package>`
npm install -g [email protected] [email protected] [email protected] [email protected] [email protected]

CMD ["dev"]
5 changes: 1 addition & 4 deletions docker/tna-python-dev/bin/dev
Original file line number Diff line number Diff line change
@@ -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" ]
Expand All @@ -12,7 +9,7 @@ then
else
nvm use default
fi
npm install -g [email protected] [email protected] [email protected] [email protected] [email protected]
npm install

if [ -d "/home/app/.local/bin/tasks" ]
then
Expand Down

0 comments on commit 2e74e71

Please sign in to comment.