microsoft/TypeAgent

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
17c6532b70d881167dfd56361fc65f2fc047f037

Branches

Tags

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

Clone

HTTPS

Download ZIP

ts/Dockerfile

39lines · modecode

1FROM node:20 AS base
2
3ENV PNPM_HOME="/pnpm"
4ENV PATH="$PNPM_HOME:$PATH"
5RUN corepack enable
6
7
8# base only image
9FROM base AS build
10COPY ./ /usr/src/app
11WORKDIR /usr/src/app
12RUN pnpm install --frozen-lockfile
13RUN pnpm run -r build
14RUN pnpm deploy --filter=agent-api --prod /prod/api
15RUN pnpm deploy --filter=tools-scripts --prod /prod/tools
16
17# image with api and tool bits only
18FROM base AS api
19# api bits
20COPY --from=build /prod/api/ /prod/api/
21COPY --from=build /prod/tools/ /prod/tools/
22# rendering bits
23COPY --from=build /usr/src/app/packages/shell/out/ /prod/shell/out/
24WORKDIR /prod/api
25
26# dependencies
27RUN apt-get update
28RUN apt install -y gnome-keyring
29RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash
30
31EXPOSE 80:3000
32
33# setup start actions
34RUN echo az login --identity >> start.sh
35RUN echo node ../tools/scripts/getKeys.mjs >> start.sh
36RUN echo pnpm start >> start.sh
37
38# azure login, then start node application
39CMD bash start.sh