deeme commited on
Commit
cc1ad01
·
verified ·
1 Parent(s): 71ef8e1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -34
Dockerfile CHANGED
@@ -1,37 +1,6 @@
1
  FROM node:20
2
 
3
- ARG DEBIAN_FRONTEND=noninteractive
4
 
5
- RUN apt-get update && apt-get install -y git
6
-
7
- # Set home to the user's home directory
8
- ENV HOME=/home/user \
9
- PATH=/home/user/.local/bin:$PATH
10
-
11
- # Set up a new user named "user" with user ID 1000
12
- RUN useradd -o -u 1000 user && mkdir -p $HOME/app && chown -R user $HOME
13
-
14
- # Switch to the "user" user
15
- USER user
16
-
17
- # Set the working directory to the user's home directory
18
- WORKDIR $HOME/app
19
-
20
-
21
- # 克隆 项目到 /workspace/app 目录下
22
- RUN git clone https://github.com/deeme/comic.git ./
23
-
24
- # Copy the current directory contents into the container at $HOME/app setting the owner to the user
25
- COPY --chown=user . $HOME/app/
26
-
27
- RUN if [ ! -f ".next/routes-manifest.json" ]; then \
28
- npm install && npm run build; \
29
- fi
30
-
31
- RUN rm -rf src
32
-
33
- EXPOSE 3000
34
-
35
- ENV PORT 3000
36
-
37
- CMD npm start
 
1
  FROM node:20
2
 
3
+ RUN apt-get update && apt-get install -y curl
4
 
5
+ # 直接跳转到新网址
6
+ CMD ["sh", "-c", "exec curl -L https://comic.168369.xyz/"]