Update Dockerfile
Browse files- Dockerfile +6 -6
Dockerfile
CHANGED
|
@@ -10,8 +10,8 @@ RUN apt-get update && apt-get install -y \
|
|
| 10 |
git \
|
| 11 |
build-essential
|
| 12 |
|
| 13 |
-
# 4. 安装Node.js
|
| 14 |
-
RUN curl -fsSL https://deb.nodesource.com/
|
| 15 |
&& apt-get install -y nodejs
|
| 16 |
|
| 17 |
# 5. 安装yarn
|
|
@@ -27,10 +27,10 @@ WORKDIR /opt/electerm
|
|
| 27 |
RUN yarn install
|
| 28 |
|
| 29 |
# 9. 构建项目
|
| 30 |
-
RUN yarn run
|
| 31 |
|
| 32 |
-
# 10. 暴露端口
|
| 33 |
EXPOSE 7860
|
| 34 |
|
| 35 |
-
# 11. 启动Electerm
|
| 36 |
-
CMD ["yarn", "
|
|
|
|
| 10 |
git \
|
| 11 |
build-essential
|
| 12 |
|
| 13 |
+
# 4. 安装Node.js 20
|
| 14 |
+
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
| 15 |
&& apt-get install -y nodejs
|
| 16 |
|
| 17 |
# 5. 安装yarn
|
|
|
|
| 27 |
RUN yarn install
|
| 28 |
|
| 29 |
# 9. 构建项目
|
| 30 |
+
RUN yarn run prepare-build
|
| 31 |
|
| 32 |
+
# 10. 暴露端口7860
|
| 33 |
EXPOSE 7860
|
| 34 |
|
| 35 |
+
# 11. 启动Electerm
|
| 36 |
+
CMD ["yarn", "start"]
|