Skip to content

Commit

Permalink
Update nodejs, include npm
Browse files Browse the repository at this point in the history
  • Loading branch information
rintisch committed Nov 17, 2023
1 parent 8a6060a commit 4cfd16d
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docker_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Docker

on:
push:
branches:
- task/update-npm
tags:
- v*

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [3.2.0] - 2023-11-17
### Updated
* Update `nodejs` version which also contains `npm`

## [3.1.0] - 2023-09-19
### Added
* Add apt package `patch` to enable installation of patches.
Expand Down
27 changes: 23 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ ENV TYPO3_CONTEXT=Production/Live \
# see https://github.com/hadolint/hadolint/wiki/DL4006
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Install needed packages, set time zone
RUN apt-get update && \
apt-get install -yqq --no-install-recommends --no-install-suggests \
ca-certificates curl gnupg && \
mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
NODE_MAJOR=20 && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
apt-get update && apt-get install --no-install-recommends --no-install-suggests -y \
nodejs && \
node -v && \
npm -v

RUN apt-get update && \
apt-get install -yqq --no-install-recommends --no-install-suggests \
apache2-utils \
Expand Down Expand Up @@ -80,13 +92,20 @@ RUN apt-get update && \
php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Composer Installer verified'; } else { echo 'Composer Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \
php composer-setup.php --install-dir=/usr/bin --filename=composer && \
php -r "unlink('composer-setup.php');" && \
# Install yarn & nodejs v16
curl -sL https://deb.nodesource.com/setup_16.x | bash - && \
# Install nodejs v20 (npm is included)
mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
NODE_MAJOR=20 && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
apt-get update && apt-get install --no-install-recommends --no-install-suggests -y \
nodejs && \
node -v && \
npm -v && \
# Install yarn (for backwards compatibility, should be dropped in v4)
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && apt-get install --no-install-recommends --no-install-suggests -y\
yarn \
nodejs && \
yarn && \
# set timezone
cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime && \
# install supercronic for cron job
Expand Down

0 comments on commit 4cfd16d

Please sign in to comment.