forked from kubero-dev/kubero
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (27 loc) · 770 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
FROM node:21-alpine AS build
ENV NODE_ENV=development
WORKDIR /build
COPY server ./server
RUN cd server && \
yarn install && \
npm run build && \
yarn swaggergen && \
cd ..
COPY client ./client
RUN cd client && \
yarn install && \
yarn build && \
cd ..
FROM build AS release
ARG VERSION=unknown
LABEL maintainer='www.kubero.dev'
LABEL version=$VERSION
ENV NODE_ENV=production
WORKDIR /app/
COPY --from=build /build/server/dist /app/server
COPY --from=build /build/server/package.json /app/server/package.json
COPY --from=build /build/server/node_modules /app/server/node_modules
COPY --from=build /build/server/swagger.json /app/swagger.json
RUN echo -n $VERSION > /app/server/VERSION
WORKDIR /app/server
CMD [ "node", "index.js" ]