Skip to content

Commit

Permalink
Merge pull request Ericsson#636 from mcserep/docker-nodejs
Browse files Browse the repository at this point in the history
Update NodeJS install method in Docker images
  • Loading branch information
mcserep authored Oct 3, 2023
2 parents 965b16c + 0740384 commit b146272
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
12 changes: 10 additions & 2 deletions docker/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ RUN set -x && apt-get update -qq \
cmake make \
default-jdk \
ctags \
ca-certificates \
curl \
gnupg \
doxygen \
gcc-9 gcc-9-plugin-dev g++-9 \
libboost-filesystem-dev \
Expand All @@ -32,8 +34,14 @@ RUN set -x && apt-get update -qq \
ln -s /usr/bin/gcc-9 /usr/bin/gcc && \
ln -s /usr/bin/g++-9 /usr/bin/g++

RUN curl -sL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get install -y nodejs
# Install NodeJS from NodeSource.
RUN mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
apt-get update -qq && \
apt-get install -y nodejs && \
apt-get clean && \
rm -rf /var/lib/apt/lists/

# Build GTest.
RUN cd /usr/src/googletest && \
Expand Down
12 changes: 10 additions & 2 deletions docker/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,21 @@ RUN set -x && apt-get update -qq \
# To switch user and exec command.
gosu \
tini \
ca-certificates \
curl \
gnupg \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/ \
&& set +x

RUN curl -sL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get install -y nodejs
# Install NodeJS from NodeSource.
RUN mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
apt-get update -qq && \
apt-get install -y nodejs && \
apt-get clean && \
rm -rf /var/lib/apt/lists/

ARG CC_GID=960
ARG CC_UID=960
Expand Down

0 comments on commit b146272

Please sign in to comment.