Mbonea commited on
Commit
4adb816
1 Parent(s): 78a316a

tested dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -15
Dockerfile CHANGED
@@ -9,7 +9,7 @@ RUN chmod -R 755 /srv
9
 
10
  # Install dependencies
11
  RUN apt-get update && \
12
- apt-get install -y libu2f-udev libvulkan1 mesa-vulkan-drivers wget ffmpeg
13
 
14
  RUN apt-get install -y \
15
  fonts-liberation \
@@ -36,22 +36,20 @@ RUN apt-get install -y \
36
  RUN wget https://github.com/Alex313031/thorium/releases/download/M117.0.5938.157/thorium-browser_117.0.5938.157_amd64.deb && \
37
  dpkg -i thorium-browser_117.0.5938.157_amd64.deb
38
 
39
-
40
- # Install NVM to manage Node.js versions
41
- RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
 
 
42
 
43
  # Activate NVM in the current shell
44
- RUN export NVM_DIR="$HOME/.nvm" && \
45
- [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
46
- [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
47
-
48
- # Install Node.js version v18.17.0 and npm v9.6.7 using NVM
49
- RUN nvm install 18.17.0
50
- RUN nvm install-latest-npm
51
-
52
- # Set the installed Node.js version as the default
53
- RUN nvm alias default 18.17.0
54
-
55
  USER admin
56
 
57
  # Copy the application code
 
9
 
10
  # Install dependencies
11
  RUN apt-get update && \
12
+ apt-get install -y libu2f-udev libvulkan1 mesa-vulkan-drivers wget ffmpeg curl
13
 
14
  RUN apt-get install -y \
15
  fonts-liberation \
 
36
  RUN wget https://github.com/Alex313031/thorium/releases/download/M117.0.5938.157/thorium-browser_117.0.5938.157_amd64.deb && \
37
  dpkg -i thorium-browser_117.0.5938.157_amd64.deb
38
 
39
+ # Install Node.js and npm
40
+ # Install NVM using sudo apt
41
+ RUN apt-get update && \
42
+ apt-get install -y curl && \
43
+ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
44
 
45
  # Activate NVM in the current shell
46
+ SHELL ["/bin/bash", "--login", "-c"]
47
+ RUN source "$HOME/.nvm/nvm.sh" && \
48
+ source "$HOME/.bashrc" && \
49
+ nvm --version && \
50
+ nvm install 18.17.0 && \
51
+ nvm alias default 18.17.0 && \
52
+ npm install -g npm@9.6.7
 
 
 
 
53
  USER admin
54
 
55
  # Copy the application code