-
Notifications
You must be signed in to change notification settings - Fork 105
/
Dockerfile
26 lines (24 loc) · 837 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
FROM public.ecr.aws/docker/library/node:18 AS builder
RUN apt-get update && apt-get install -y openssl
WORKDIR /app
RUN yarn global add turbo
COPY . .
RUN turbo prune --scope="@linen/queue" --docker
FROM public.ecr.aws/docker/library/node:18 AS installer
RUN apt-get update && apt-get install -y openssl
WORKDIR /app
COPY .gitignore .gitignore
COPY --from=builder /app/out/json/ .
COPY --from=builder /app/out/yarn.lock ./yarn.lock
RUN yarn install
COPY --from=builder /app/out/full/ .
COPY turbo.json turbo.json
RUN yarn turbo run build --filter='@linen/queue'
FROM public.ecr.aws/docker/library/node:18 AS runner
RUN apt-get update && apt-get install -y openssl
WORKDIR /app
RUN yarn global add pm2
# RUN addgroup --system --gid 1001 linenuser
# RUN adduser --system --uid 1001 linenuser
# USER linenuser
COPY --from=installer /app .