This commit is contained in:
Jhonatan Lopes 2023-10-06 12:50:54 -03:00 коммит произвёл GitHub
Родитель dd6cf2baf8
Коммит 7912ffebd3
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 10 добавлений и 4 удалений

1
.nvmrc Normal file
Просмотреть файл

@ -0,0 +1 @@
18

Просмотреть файл

@ -120,15 +120,20 @@ FROM base as dev
# Swap user, so the following tasks can be run as root
USER root
# Install node (Keep the version in sync with the node container above)
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && apt-get install -y nodejs
# Install `psql`, useful for `manage.py dbshell`
RUN apt-get install -y postgresql-client
RUN apt-get update --yes --quiet && apt-get install --yes --quiet --no-install-recommends \
postgresql-client \
&& apt-get autoremove && rm -rf /var/lib/apt/lists/*
# Restore user
USER mozilla
# Install nvm and node/npm (will install node version defined in .nvmrc)
# (Keep the version in sync with the node install above)
COPY --chown=mozilla .nvmrc ./
RUN curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash && \
bash --login -c "nvm install --no-progress && nvm alias default $(nvm run --silent --version)"
# Pull in the node modules from the frontend build stage so we don't have to run npm ci again.
# This is just a copy in the container, and is not visible to the host machine.
# We can't mount this as the empty directory in the host will obscure our the installed content.