Skip to content

Commit 8ed80dc

Browse files
authored
fix(web): docker build error (#100)
1 parent deb2486 commit 8ed80dc

2 files changed

Lines changed: 8 additions & 12 deletions

File tree

web/.yarn/install-state.gz

908 Bytes
Binary file not shown.

web/Dockerfile

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,16 @@ ENV GITHUB_SHA=$GITHUB_SHA
99
# Enable Corepack to use the correct Yarn version from package.json
1010
RUN corepack enable
1111

12-
RUN --mount=type=bind,source=package.json,target=package.json \
13-
--mount=type=bind,source=yarn.lock,target=yarn.lock \
14-
--mount=type=cache,target=/root/.yarn,sharing=locked \
12+
COPY package.json yarn.lock .yarnrc.yml ./
13+
14+
RUN --mount=type=cache,target=/root/.yarn,sharing=locked \
1515
yarn install --immutable
1616

17-
RUN --mount=type=bind,source=package.json,target=package.json \
18-
--mount=type=bind,source=yarn.lock,target=yarn.lock \
19-
--mount=type=bind,source=index.html,target=index.html \
20-
--mount=type=bind,source=published.html,target=published.html \
21-
--mount=type=bind,source=tsconfig.json,target=tsconfig.json \
22-
--mount=type=bind,source=vite.config.ts,target=vite.config.ts \
23-
--mount=type=bind,source=src,target=src \
24-
--mount=type=cache,target=/root/.yarn,sharing=locked \
25-
yarn build
17+
COPY index.html published.html ./
18+
COPY tsconfig.json vite.config.ts ./
19+
COPY src ./src
20+
21+
RUN yarn build
2622

2723
FROM nginx:1.27-alpine
2824
WORKDIR /usr/share/nginx/html

0 commit comments

Comments
 (0)