microsoft/typespec

Public

mirrored from https://github.com/microsoft/typespecAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
b3ccea911f84af2ca3ef27d6f2d40221b21dade6

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

docker/Dockerfile

31lines · modecode

1# --------------------------------
2# Build compiler
3# --------------------------------
4# cspell:ignore tdnf
5FROM mcr.microsoft.com/devcontainers/javascript-node:24 AS builder
6COPY . /app
7
8# Upgrade all packages per https://eng.ms/docs/more/containers-secure-supply-chain/updating.
9# RUN tdnf update -y \
10# && tdnf install -y \
11# git \
12# && tdnf clean all
13
14WORKDIR /app
15RUN npm install -g pnpm
16RUN pnpm install --filter "@typespec/compiler..."
17RUN pnpm --filter "@typespec/compiler..." run build
18
19WORKDIR /app/packages/compiler
20RUN pnpm pack
21
22# --------------------------------
23# Setup final image
24# --------------------------------
25FROM mcr.microsoft.com/azurelinux/base/nodejs:24
26
27COPY --from=builder /app/packages/compiler/*.tgz /tmp/compiler.tgz
28
29RUN npm install -g /tmp/compiler.tgz && rm /tmp/compiler.tgz
30
31ENTRYPOINT ["tsp"]
32