ChenyuRabbitLove commited on
Commit
6a4830b
·
verified ·
1 Parent(s): 1d555c6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -3
Dockerfile CHANGED
@@ -1,17 +1,27 @@
1
  FROM python:3.11.8
2
 
3
  USER root
 
 
4
  RUN apt-get update && apt-get install -y \
5
  git \
6
  git-lfs \
7
  ca-certificates \
8
  curl \
 
9
  --no-install-recommends && \
10
- curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
11
- apt-get install -y nodejs && \
12
  apt-get clean && \
13
  rm -rf /var/lib/apt/lists/*
14
 
 
 
 
 
 
 
 
 
 
15
  RUN useradd -m -u 1000 user
16
 
17
  USER user
@@ -34,4 +44,4 @@ RUN --mount=type=secret,id=local_config,mode=0444,required=true \
34
  export local_config=$(cat /run/secrets/local_config) && \
35
  echo "export local_config=${local_config}" >> $HOME/.bashrc
36
 
37
- CMD ["python", "app.py"]
 
1
  FROM python:3.11.8
2
 
3
  USER root
4
+
5
+ # Install dependencies
6
  RUN apt-get update && apt-get install -y \
7
  git \
8
  git-lfs \
9
  ca-certificates \
10
  curl \
11
+ xz-utils \
12
  --no-install-recommends && \
 
 
13
  apt-get clean && \
14
  rm -rf /var/lib/apt/lists/*
15
 
16
+ # Install Node.js v20.18.0
17
+ RUN NODE_VERSION=v20.18.0 && \
18
+ ARCH=linux-x64 && \
19
+ curl -fsSL https://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}-${ARCH}.tar.xz | \
20
+ tar -xJ -C /usr/local --strip-components=1
21
+
22
+ # Verify Node.js and npm versions
23
+ RUN node -v && npm -v
24
+
25
  RUN useradd -m -u 1000 user
26
 
27
  USER user
 
44
  export local_config=$(cat /run/secrets/local_config) && \
45
  echo "export local_config=${local_config}" >> $HOME/.bashrc
46
 
47
+ CMD ["python", "app.py"]