1
0
Fork 0

dev-tools: use apt source for Node instead of setup script

Extra bits:

  - use a single RUN instruction
  - silence upgrade notices from pip and npm
This commit is contained in:
Adeodato Simó 2023-10-17 02:25:26 -03:00
parent 66f62566d6
commit 1937177e1a
No known key found for this signature in database
GPG key ID: CDF447845F1A986F
2 changed files with 44 additions and 10 deletions

View file

@ -1,14 +1,14 @@
FROM python:3.9
ENV PYTHONUNBUFFERED 1
RUN mkdir /app
WORKDIR /app
COPY package.json requirements.txt .stylelintrc.js .stylelintignore /app/
RUN pip install -r requirements.txt
ENV PYTHONUNBUFFERED=1
ENV NPM_CONFIG_UPDATE_NOTIFIER=false
ENV PIP_ROOT_USER_ACTION=ignore PIP_DISABLE_PIP_VERSION_CHECK=1
RUN apt-get update && apt-get install -y curl
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
RUN apt-get install -y nodejs && apt-get clean
RUN npm install .
COPY nodejs.sources /etc/apt/sources.list.d/
COPY package.json requirements.txt .stylelintrc.js .stylelintignore /app/
RUN apt-get update && \
apt-get install -y nodejs && \
pip install -r requirements.txt && \
npm install .