niuyazhe commited on
Commit
e60e77c
·
1 Parent(s): 94a0346

fix(nyz): fix bugs

Browse files
Files changed (2) hide show
  1. Dockerfile +10 -4
  2. start.sh +0 -2
Dockerfile CHANGED
@@ -1,12 +1,18 @@
1
  FROM amazonlinux:2023.2.20231011.0 as base
2
 
3
- WORKDIR /app
4
 
5
  RUN dnf install vim git nodejs -y && npm install -g pnpm
6
 
7
- RUN git clone https://github.com/opendilab/CleanS2S.git /app/CleanS2S
 
 
 
8
 
9
- RUN cd /app/CleanS2S/frontend_nextjs && pnpm install
 
 
 
 
10
 
11
  EXPOSE 7860
12
- CMD sh ./start.sh
 
1
  FROM amazonlinux:2023.2.20231011.0 as base
2
 
 
3
 
4
  RUN dnf install vim git nodejs -y && npm install -g pnpm
5
 
6
+ # Switch to the "user" user
7
+ RUN useradd -m -u 1000 user
8
+ RUN mkdir -p /CleanS2S && chown -R 1000:1000 /CleanS2S
9
+ USER user
10
 
11
+ RUN git clone https://github.com/opendilab/CleanS2S.git
12
+
13
+ WORKDIR /CleanS2S/frontend_nextjs
14
+
15
+ RUN pnpm install
16
 
17
  EXPOSE 7860
18
+ CMD ["pnpm", "dev", "--port", "7860"]
start.sh DELETED
@@ -1,2 +0,0 @@
1
- #!/bin/sh
2
- cd /app/CleanS2S & pnpm dev --port 7860