sanbo commited on
Commit
33c0cae
·
1 Parent(s): 26054f8

update sth. at 2024-10-30 12:44:03

Browse files
Files changed (2) hide show
  1. Dockerfile +3 -3
  2. start.sh +3 -11
Dockerfile CHANGED
@@ -7,6 +7,6 @@ RUN apk add --no-cache socat
7
  # 暴露对外端口 7680
8
  EXPOSE 7680
9
 
10
- # 使用 socat 映射端口
11
- CMD socat TCP-LISTEN:7680,fork TCP:localhost:8080 &
12
- CMD ["/app/duck2api"]
 
7
  # 暴露对外端口 7680
8
  EXPOSE 7680
9
 
10
+
11
+ # 设置启动命令
12
+ CMD ["/start.sh"]
start.sh CHANGED
@@ -1,12 +1,4 @@
1
- #!/bin/sh
2
-
3
- # 启动 Nginx
4
- echo "Starting nginx..."
5
- nginx &
6
-
7
- # 等待 Nginx 启动
8
- sleep 2
9
-
10
- # 启动 Duck2API 服务
11
  echo "Starting duck2api..."
12
- /app/duck2api
 
1
+ echo "Starting socat..."
2
+ socat TCP-LISTEN:7680,fork TCP:localhost:8080 &
 
 
 
 
 
 
 
 
3
  echo "Starting duck2api..."
4
+ exec /app/duck2api