File tree Expand file tree Collapse file tree 3 files changed +13
-13
lines changed
Expand file tree Collapse file tree 3 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ LABEL version="Beta1.0" description="JavaScriptCollection文档合集、博客"
44LABEL author="【Github&公众号】:Rong姐姐好可爱" email="fairy@2925.com"
55RUN mkdir -p /apps
66# # 确定工作空间 /apps
7- COPY . /apps
87WORKDIR /apps
8+ COPY . /apps
99
1010# # 安装依赖
11- RUN npm ci --registry https://registry.npmmirror.com && npm run build
11+ RUN npm i pnpm@6 -g && pnpm i -D && npm run build
1212
1313# 设置部署镜像
1414FROM registry.cn-hangzhou.aliyuncs.com/142vip/nginx:latest
@@ -18,4 +18,4 @@ COPY --from=build_base /apps/docs/.vuepress/dist/ /usr/share/nginx/html/
1818# # 配置文件
1919COPY nginx.conf /etc/nginx/
2020EXPOSE 7100
21- CMD ["nginx" , "-g" , "daemon off;" ]
21+ # CMD ["nginx", "-g", "daemon off;"]
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import sidebar from "./config/sidebar";
1010export default {
1111 title : "凡是过往、皆为序章" ,
1212 description : "一本有趣的JavaScript合集" ,
13- // base: "/JavaScriptCollection/",
13+ base : "/JavaScriptCollection/" ,
1414 port : 7100 ,
1515 head : [
1616 [ "link" , { rel : "icon" , href : "/fight_favicon.ico" } ]
Original file line number Diff line number Diff line change 11#! /bin/bash
22# # 功能:本地前后端项目构建、打包镜像,上传docker仓库
33# # 参考:https://blog.csdn.net/Dontla/article/details/125210694
4- # # 作者:Rong姐姐好可爱
5- # # 使用示例:bash xxx.sh 容器名称 版本号
4+ # # 作者:储凡
5+ # # 使用示例:bash xxx.sh 版本号
66# # - bash build_image.sh 0.0. x
77# #
88
@@ -28,9 +28,9 @@ prepare_check(){
2828}
2929
3030run (){
31- echo -e " ${successLogger} ---------------- shell doc_book start ---------------- "
32- docker build -t " ${repoAddress} :${projectName} _ ${version} " .
33- echo -e " ${successLogger} ---------------- shell doc_book end ---------------- "
31+ echo -e " ${successLogger} ---------------- shell ${projectName} start ---------------- "
32+ docker build -t " ${repoAddress} :${projectName} - ${version} " .
33+ echo -e " ${successLogger} ---------------- shell ${projectName} end ---------------- "
3434 push_docker_image
3535}
3636
@@ -39,14 +39,14 @@ run(){
3939
4040# # 推送镜像
4141push_docker_image (){
42- if [[ " $( docker images -q " ${repoAddress} :${projectName} _ ${version} " 2> /dev/null) " != " " ]];
42+ if [[ " $( docker images -q " ${repoAddress} :${projectName} - ${version} " 2> /dev/null) " != " " ]];
4343 then
4444 # # 推送
45- docker push " ${repoAddress} :${projectName} _ ${version} "
45+ docker push " ${repoAddress} :${projectName} - ${version} "
4646 echo -e " ${successLogger} ---------------- 上传镜像成功,删除本地镜像 ---------------- "
47- docker rmi " ${repoAddress} :${projectName} _ ${version} "
47+ docker rmi " ${repoAddress} :${projectName} - ${version} "
4848 else
49- echo -e " ${errorLogger}${currentTime} :镜像:${repoAddress} :${projectName} _ ${version} 不存在"
49+ echo -e " ${errorLogger}${currentTime} :镜像:${repoAddress} :${projectName} - ${version} 不存在"
5050 fi
5151 exit 0
5252}
You can’t perform that action at this time.
0 commit comments