runtipi/Dockerfile

47 lines
1 KiB
Text
Raw Normal View History

FROM node:18 AS builder
RUN npm install node-gyp -g
WORKDIR /api
COPY ./packages/system-api/package.json /api/package.json
RUN npm i
# ---
WORKDIR /dashboard
COPY ./packages/dashboard/package.json /dashboard/package.json
RUN npm i
WORKDIR /api
COPY ./packages/system-api /api
RUN npm run build
# ---
WORKDIR /dashboard
COPY ./packages/dashboard /dashboard
RUN npm run build
FROM alpine:3.16.0 as app
2022-06-03 20:42:23 +00:00
WORKDIR /
2022-10-06 16:30:47 +00:00
# # Install dependencies
RUN apk --no-cache add nodejs npm
RUN apk --no-cache add g++
2022-10-05 21:25:14 +00:00
RUN apk --no-cache add make
RUN apk --no-cache add python3
2022-06-11 11:02:39 +00:00
RUN npm install node-gyp -g
2022-06-03 20:42:23 +00:00
WORKDIR /api
2022-06-22 19:28:48 +00:00
COPY ./packages/system-api/package*.json /api/
2022-10-05 21:25:14 +00:00
RUN npm install --omit=dev
2022-06-03 20:42:23 +00:00
COPY --from=builder /api/dist /api/dist
2022-10-07 21:35:48 +00:00
WORKDIR /dashboard
COPY --from=builder /dashboard/next.config.js ./
COPY --from=builder /dashboard/public ./public
COPY --from=builder /dashboard/package.json ./package.json
COPY --from=builder --chown=node:node /dashboard/.next/standalone ./
COPY --from=builder --chown=node:node /dashboard/.next/static ./.next/static
2022-06-03 20:42:23 +00:00
WORKDIR /