Skip to content

Commit

Permalink
Switched to nvm instead of outdated nodejs install script, updated to…
Browse files Browse the repository at this point in the history
… nodejs v18

Signed-off-by: Tibor Dancs <[email protected]>
  • Loading branch information
ScrewTSW committed Sep 27, 2023
1 parent 85d287b commit 89e9d72
Show file tree
Hide file tree
Showing 4 changed files with 5,551 additions and 5,539 deletions.
13 changes: 10 additions & 3 deletions tests/e2e/build/dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
FROM selenium/standalone-chrome:114.0
FROM selenium/standalone-chrome:117.0

ENV DISPLAY=':20'

USER root

RUN apt-get update && apt-get install && \
apt-get install -y ftp x11vnc ffmpeg libvpx6 && \
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - && \
apt-get install -y nodejs && \
curl -fsSLo- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash && \
export NVM_DIR="$HOME/.nvm" && \
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" && \
nvm install lts/hydrogen && nvm alias default lts/hydrogen && nvm use default && nvm list && \
npm install -g typescript && \
node -v

Expand All @@ -21,6 +24,10 @@ RUN sed -i "s/nodaemon=true/nodaemon=false/" /etc/supervisord.conf
COPY package.json package-lock.json /tmp/e2e/

RUN cd /tmp/e2e && \
export NVM_DIR="$HOME/.nvm" && \
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" && \
nvm use default && \
npm i

COPY . /tmp/e2e
Expand Down
6 changes: 5 additions & 1 deletion tests/e2e/build/dockerfiles/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/bin/bash
#!/usr/bin/env bash

EXIT_CODE=0
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm use default

kill_ffmpeg(){
echo "Killing ffmpeg with PID=$ffmpeg_pid"
Expand Down
Loading

0 comments on commit 89e9d72

Please sign in to comment.