cadl/docker/Dockerfile

28 строки
718 B
Docker
Исходник Обычный вид История

2021-11-12 22:17:46 +03:00
# --------------------------------
# Build compiler
# --------------------------------
FROM mcr.microsoft.com/mirror/docker/library/node:18-alpine as builder
2021-11-12 22:17:46 +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
RUN corepack enable && corepack prepare
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
# --------------------------------
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" ]