Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +11 -3
Dockerfile
CHANGED
|
@@ -7,7 +7,7 @@ RUN apt-get update && apt-get install -y \
|
|
| 7 |
&& curl -fsSL https://code-server.dev/install.sh | sh
|
| 8 |
RUN apt install gcc g++ gdb clangd wget -y
|
| 9 |
RUN cd /usr/local/bin
|
| 10 |
-
RUN wget -O frpc https://nya.globalslb.net/natfrp/client/frpc/0.51.0-sakura-12.3/frpc_linux_amd64
|
| 11 |
RUN chmod 755 frpc
|
| 12 |
RUN ls -ls frpc
|
| 13 |
RUN md5sum frpc
|
|
@@ -27,5 +27,13 @@ ENV TZ=Asia/Shanghai
|
|
| 27 |
# 暴露code-server默认端口
|
| 28 |
EXPOSE 8080
|
| 29 |
|
| 30 |
-
|
| 31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
&& curl -fsSL https://code-server.dev/install.sh | sh
|
| 8 |
RUN apt install gcc g++ gdb clangd wget -y
|
| 9 |
RUN cd /usr/local/bin
|
| 10 |
+
RUN wget -O /usr/local/bin/frpc https://nya.globalslb.net/natfrp/client/frpc/0.51.0-sakura-12.3/frpc_linux_amd64
|
| 11 |
RUN chmod 755 frpc
|
| 12 |
RUN ls -ls frpc
|
| 13 |
RUN md5sum frpc
|
|
|
|
| 27 |
# 暴露code-server默认端口
|
| 28 |
EXPOSE 8080
|
| 29 |
|
| 30 |
+
RUN echo '#!/bin/bash\n\
|
| 31 |
+
# 1. 启动 frpc (后台运行)\n\
|
| 32 |
+
/usr/local/bin/frpc -f xi0ysolte634lz5zl7g2l80p5gvktkj5:24747946 &\n\
|
| 33 |
+
# 2. 前台启动 code-server (保持容器运行)\n\
|
| 34 |
+
exec code-server --bind-addr 0.0.0.0:8080 --auth none' > /start.sh
|
| 35 |
+
RUN chmod +x /start.sh
|
| 36 |
+
# 切换回coder用户
|
| 37 |
+
USER coder
|
| 38 |
+
# 将启动脚本设为容器入口
|
| 39 |
+
CMD ["/start.sh"]
|