2021-11-12 22:17:46 +03:00
|
|
|
# --------------------------------
|
|
|
|
# Build compiler
|
|
|
|
# --------------------------------
|
2022-06-03 01:33:50 +03:00
|
|
|
FROM mcr.microsoft.com/mirror/docker/library/node:18-alpine as builder
|
2021-11-12 22:17:46 +03:00
|
|
|
|
2022-04-19 00:09:58 +03:00
|
|
|
RUN apk add --no-cache git
|
2021-11-12 22:17:46 +03:00
|
|
|
COPY . /app
|
|
|
|
|
|
|
|
WORKDIR /app
|
2023-02-16 01:37:39 +03:00
|
|
|
ENV TYPESPEC_SKIP_VS_BUILD=1
|
2024-05-24 03:20:36 +03:00
|
|
|
RUN corepack enable && corepack prepare
|
2024-01-25 00:37:34 +03:00
|
|
|
RUN pnpm install --frozen-lockfile
|
|
|
|
RUN pnpm --filter "@typespec/compiler..." run build
|
2021-11-12 22:17:46 +03:00
|
|
|
|
|
|
|
WORKDIR /app/packages/compiler
|
|
|
|
RUN npm pack
|
|
|
|
|
|
|
|
# --------------------------------
|
|
|
|
# Setup final image
|
|
|
|
# --------------------------------
|
2022-06-03 01:33:50 +03:00
|
|
|
FROM mcr.microsoft.com/mirror/docker/library/node:18-alpine
|
2021-11-12 22:17:46 +03:00
|
|
|
|
|
|
|
COPY --from=builder /app/packages/compiler/*.tgz /tmp/compiler.tgz
|
|
|
|
|
|
|
|
RUN npm install -g /tmp/compiler.tgz && rm /tmp/compiler.tgz
|
|
|
|
|
2023-03-28 23:31:23 +03:00
|
|
|
ENTRYPOINT [ "tsp" ]
|