-
Notifications
You must be signed in to change notification settings - Fork 111
/
Copy pathDockerfile
45 lines (30 loc) · 869 Bytes
/
Dockerfile
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
FROM node:18.17-alpine as base
ARG TURBO_TEAM
ENV TURBO_TEAM=$TURBO_TEAM
ARG TURBO_TOKEN
ENV TURBO_TOKEN=$TURBO_TOKEN
# PRUNE DEPENDENCIES
FROM base AS builder
RUN apk add --no-cache libc6-compat
RUN apk update
WORKDIR /app
RUN npm install [email protected] --global
COPY . .
RUN turbo prune --scope=@audius/sdk --docker
# INSTALL & BUILD
FROM base AS installer
WORKDIR /app
RUN apk add --no-cache python3 py3-pip make g++ bash libc6-compat
RUN apk update
COPY .gitignore .gitignore
COPY --from=builder /app/out/json/ .
COPY --from=builder /app/out/package-lock.json ./package-lock.json
COPY --from=builder /app/scripts ./scripts
RUN CI=true npm i
# Build the project and its dependencies
COPY --from=builder /app/out/full/ .
COPY turbo.json turbo.json
RUN npx turbo run build --filter=@audius/sdk
ARG git_sha
ENV GIT_SHA=$git_sha
WORKDIR /app/packages/libs