-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
68 lines (43 loc) · 1.43 KB
/
Dockerfile
File metadata and controls
68 lines (43 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
FROM node:20-slim as configs
WORKDIR /app
RUN mkdir -p /app/web
COPY access-graph/package.json /app
COPY access-graph/yarn.lock /app
COPY access-graph/tsconfig.json /app
COPY access-graph/tsconfig.node.json /app
COPY access-graph/web/package.json /app/web
FROM configs as node-dependencies
# download and install npm dependencies
ARG YARN_FROZEN_LOCKFILE
RUN yarn install --ignore-scripts
RUN yarn $NPM_SCRIPT $([ -z $OUTPUT ] || echo --output-path=$OUTPUT)
FROM node-dependencies as teleport-build
COPY packages/ packages/
ARG NPM_SCRIPT=nop
ARG OUTPUT
# run npm script with optional --output-path parameter
RUN yarn $NPM_SCRIPT $([ -z $OUTPUT ] || echo --output-path=$OUTPUT)
FROM node-dependencies as python-git
RUN apt-get update && apt-get install -y python3 git
FROM python-git as term-build
RUN apt-get install -y g++ make
COPY packages/ packages/
RUN yarn install
ARG NPM_SCRIPT=nop
ARG OUTPUT
ARG CONNECT_TSH_BIN_PATH
ENV CONNECT_TSH_BIN_PATH=$CONNECT_TSH_BIN_PATH
# run npm script with optional --output-path parameter
RUN yarn $NPM_SCRIPT $([ -z $OUTPUT ] || echo --output-path=$OUTPUT)
FROM python-git as lint
RUN apt-get install -y python3-pip && pip3 install pre-commit
RUN git init .
COPY packages/ packages/
COPY .eslintignore .
COPY .gitignore .
COPY .eslintrc.js .
COPY .pre-commit-config.yaml .
COPY .prettierignore .
COPY .prettierrc .
RUN git add --all
RUN pre-commit run --show-diff-on-failure --color=always --all-files