-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (30 loc) · 969 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
FROM ubuntu:22.04 AS base
RUN \
apt-get update && \
apt-get install -y ca-certificates curl openssl && \
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs && \
curl --silent --remote-name --location https://download.ceph.com/rpm-18.2.2/el9/noarch/cephadm && \
chmod +x cephadm && \
./cephadm add-repo --release reef && \
./cephadm install ceph-common && \
rm -rf /var/lib/apt/lists/*
FROM base AS build
RUN corepack enable
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY . .
RUN pnpm build
FROM base AS dependencies
RUN corepack enable
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile --production
FROM base
WORKDIR /app
COPY --from=dependencies /app/node_modules /app/node_modules
COPY --from=build /app/dist /app/dist
ARG CLOUD_AGENT_VERSION=dev
ENV CLOUD_AGENT_VERSION=${CLOUD_AGENT_VERSION}
CMD [ "node", "dist/index.js" ]