Spaces:
Running
Running
iridescentX
commited on
Update Dockerfile
Browse files- Dockerfile +0 -28
Dockerfile
CHANGED
@@ -1,33 +1,5 @@
|
|
1 |
-
|
2 |
-
# 使用 searxng 镜像
|
3 |
FROM searxng/searxng:latest
|
4 |
-
|
5 |
-
# 设置 SEARXNG 的环境变量,默认使用 localhost
|
6 |
ENV SEARXNG_BASE_URL=https://${SEARXNG_HOSTNAME:-localhost}/
|
7 |
-
|
8 |
-
ENV SEARXNG_PORT=8080
|
9 |
-
|
10 |
-
# 暴露服务端口
|
11 |
-
EXPOSE 8080
|
12 |
-
|
13 |
-
|
14 |
-
# 创建并设置 /etc/searxng 的权限
|
15 |
RUN mkdir /etc/searxng \
|
16 |
&& chmod 777 /etc/searxng
|
17 |
-
|
18 |
-
# 复制本地配置到容器
|
19 |
COPY ./searxng /etc/searxng
|
20 |
-
|
21 |
-
# 安装 Cloudflare CLI 工具
|
22 |
-
COPY --from=cloudflare/cloudflared:latest /usr/local/bin/cloudflared /usr/local/bin/cloudflared
|
23 |
-
|
24 |
-
|
25 |
-
# 修改 ping_group_range,确保 cloudflared 进程有权限使用 ICMP proxy
|
26 |
-
RUN echo "net.ipv4.ping_group_range=0 65535" >> /etc/sysctl.conf
|
27 |
-
|
28 |
-
# 运行时应用 sysctl 设置
|
29 |
-
RUN sysctl -p
|
30 |
-
|
31 |
-
# 启动 searxng 服务并使用 cloudflared 连接
|
32 |
-
CMD searxng & \
|
33 |
-
cloudflared tunnel --no-autoupdate run --token $CF_TOKEN
|
|
|
|
|
|
|
1 |
FROM searxng/searxng:latest
|
|
|
|
|
2 |
ENV SEARXNG_BASE_URL=https://${SEARXNG_HOSTNAME:-localhost}/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
RUN mkdir /etc/searxng \
|
4 |
&& chmod 777 /etc/searxng
|
|
|
|
|
5 |
COPY ./searxng /etc/searxng
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|