microsoft/typespec

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
db8de25e36b2ae9892be3bd9d56fc8f225a7ef6c

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/azurelinux/base/nodejs:20.14 AS builder
6COPY . /app
7
8# Upgrade all packages per https://eng.ms/docs/more/containers-secure-supply-chain/updating.
9RUN 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 npm pack
21
22# --------------------------------
23# Setup final image
24# --------------------------------
25FROM mcr.microsoft.com/azurelinux/base/nodejs:20.14
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