-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathDockerfile.mfe
More file actions
29 lines (25 loc) · 936 Bytes
/
Dockerfile.mfe
File metadata and controls
29 lines (25 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM harness0.harness.io/oci/docker_artifacts/node:22-slim AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
# install pnpm
RUN npm install -g pnpm@latest-9
COPY . /canary
WORKDIR /canary
FROM base AS prod-deps
# install deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
FROM base AS build
# install deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
# build all packages (pnpm handles dependency ordering)
RUN pnpm -r -F './packages/*' build
# build the microfrontend
WORKDIR /canary/apps/gitness
RUN rm -rf dist
RUN pnpm run build:webpack
FROM harness0.harness.io/oci/docker_artifacts/ubi9:9-rfcurated AS final
COPY --from=build /canary/apps/gitness/dist /canary-dist
WORKDIR /canary-dist
# FROM harness/harness:unscripted2024 AS server
# COPY --from=build /canary/apps/gitness/dist /canary
# ENV GITNESS_DEVELOPMENT_UI_SOURCE_OVERRIDE=/canary