generated from dvdksn/clockbox
-
-
Notifications
You must be signed in to change notification settings - Fork 53
/
Dockerfile
42 lines (29 loc) · 1.02 KB
/
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
FROM node:21-alpine AS builder
ENV NODE_ENV=development
RUN apk --update --no-cache add git
WORKDIR /app
ADD ./package.json ./package.json
ADD ./yarn.lock ./yarn.lock
RUN yarn
ADD ./src ./src
ADD ./tsconfig.json ./tsconfig.json
RUN yarn build
FROM node:21-alpine
LABEL \
maintainer="Clairton Rodrigo Heinzen <[email protected]>" \
org.opencontainers.image.title="Unoapi Cloud" \
org.opencontainers.image.description="Unoapi Cloud" \
org.opencontainers.image.authors="Clairton Rodrigo Heinzen <[email protected]>" \
org.opencontainers.image.url="https://github.com/clairton/unoapi-cloud" \
org.opencontainers.image.vendor="https://clairton.eti.br" \
org.opencontainers.image.licenses="GPLv3"
ENV NODE_ENV=production
RUN addgroup -S u && adduser -S u -G u
WORKDIR /home/u/app
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/yarn.lock ./yarn.lock
RUN apk --update --no-cache add git ffmpeg
RUN yarn
RUN apk del git
ENTRYPOINT yarn start