Spaces:
Paused
Paused
Rename Dockerfile-alpine.txt to Dockerfile
Browse files
Dockerfile-alpine.txt → Dockerfile
RENAMED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
-
FROM
|
| 2 |
|
| 3 |
# 安装依赖:SSH、Nginx、Cloudflared、bash
|
| 4 |
-
RUN
|
| 5 |
# 设置 root 密码
|
| 6 |
echo "root:123456" | chpasswd && \
|
| 7 |
sed -i 's/#Port 22/Port 2222/' /etc/ssh/sshd_config && \
|
|
@@ -13,7 +13,7 @@ RUN apk add --no-cache openssh bash curl && \
|
|
| 13 |
mkdir -p /var/run/sshd /run/nginx /etc/cloudflared && \
|
| 14 |
# 生成 SSH host keys
|
| 15 |
ssh-keygen -A && \
|
| 16 |
-
rm -rf /var/cache/
|
| 17 |
#touch /etc/nginx/nginx.conf
|
| 18 |
|
| 19 |
# 复制 Nginx 配置
|
|
@@ -38,11 +38,12 @@ RUN curl -L --output /usr/local/bin/cloudflared https://github.com/cloudflare/cl
|
|
| 38 |
# 启动脚本
|
| 39 |
#COPY start.sh /start.sh
|
| 40 |
#RUN chmod +x /start.sh
|
|
|
|
| 41 |
|
| 42 |
# 暴露端口(容器内)
|
| 43 |
|
| 44 |
|
| 45 |
-
RUN
|
| 46 |
echo "user:hf123" | chpasswd
|
| 47 |
|
| 48 |
# 4. 目录授权 (关键步骤)
|
|
|
|
| 1 |
+
FROM node:slim
|
| 2 |
|
| 3 |
# 安装依赖:SSH、Nginx、Cloudflared、bash
|
| 4 |
+
RUN apt install --no-cache openssh bash curl nginx && \
|
| 5 |
# 设置 root 密码
|
| 6 |
echo "root:123456" | chpasswd && \
|
| 7 |
sed -i 's/#Port 22/Port 2222/' /etc/ssh/sshd_config && \
|
|
|
|
| 13 |
mkdir -p /var/run/sshd /run/nginx /etc/cloudflared && \
|
| 14 |
# 生成 SSH host keys
|
| 15 |
ssh-keygen -A && \
|
| 16 |
+
rm -rf /var/cache/apt/*
|
| 17 |
#touch /etc/nginx/nginx.conf
|
| 18 |
|
| 19 |
# 复制 Nginx 配置
|
|
|
|
| 38 |
# 启动脚本
|
| 39 |
#COPY start.sh /start.sh
|
| 40 |
#RUN chmod +x /start.sh
|
| 41 |
+
RUN npm install -g openclaw@latest
|
| 42 |
|
| 43 |
# 暴露端口(容器内)
|
| 44 |
|
| 45 |
|
| 46 |
+
RUN useradd -D -u 1000 user && \
|
| 47 |
echo "user:hf123" | chpasswd
|
| 48 |
|
| 49 |
# 4. 目录授权 (关键步骤)
|