-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (28 loc) · 835 Bytes
/
Dockerfile
File metadata and controls
33 lines (28 loc) · 835 Bytes
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
FROM node:18-alpine as planner
WORKDIR /cli
COPY ./package.json ./package.json
FROM node:18-alpine as cacher-dev
WORKDIR /cli
COPY --from=planner /cli/package.json ./package.json
RUN npm install
FROM node:18-alpine as cacher
WORKDIR /cli
COPY --from=planner /cli/package.json ./package.json
RUN npm install --omit=dev
FROM node:18-alpine as builder
RUN npm install -g typescript
WORKDIR /cli
COPY --from=cacher-dev /cli/node_modules ./node_modules
COPY . .
RUN npm run build
###
FROM node:18-bullseye as release
RUN npm install -g typescript
WORKDIR /cli
ARG WEBRESTO_REGISTRY_TOKEN
ARG WEBRESTO_REGISTRY
ENV WEBRESTO_REGISTRY "https://marketplace.restoapp.org/"
COPY --from=builder ./cli/dist .
RUN ln -s /cli/src/bin/main.bin.js /bin/webresto
RUN chmod +x /bin/webresto
COPY --from=cacher /cli/node_modules ./node_modules