diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..7510a37 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,15 @@ +node_modules +.git +.gitignore +*.md +.vscode +.idea +dist +unpackage +.DS_Store +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.env.local +.env.*.local diff --git a/Dockerfile b/Dockerfile index 4f59c68..f4fa930 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,9 +18,15 @@ COPY package.json ./ # 安装所有依赖 RUN npm install --legacy-peer-deps +# 安装 git (用于获取 commit 信息) +RUN apk add --no-cache git + # 复制源代码 COPY . . +# 列出文件确认复制成功 +RUN ls -la + # 构建 H5 生产版本 RUN npm run build:h5 diff --git a/package.json b/package.json index f4db418..a6e13fa 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "scripts": { "dev:h5": "uni", - "build:h5": "UNI_INPUT_DIR=. uni build -p h5" + "build:h5": "uni build -p h5" }, "devDependencies": { "@dcloudio/types": "3.4.19",