mirror of
https://github.com/element-hq/matrix-authentication-service.git
synced 2026-05-15 08:05:40 +00:00
29 lines
522 B
Docker
29 lines
522 B
Docker
|
|
# Build Node.js app
|
|
FROM --platform=${BUILDPLATFORM} node:18-alpine AS builder
|
|
|
|
WORKDIR /syn2mas
|
|
|
|
COPY ./package.json ./package-lock.json ./
|
|
RUN --network=default \
|
|
npm ci
|
|
|
|
COPY ./tsconfig.json ./
|
|
COPY ./src ./src/
|
|
|
|
RUN --network=none \
|
|
npm run build
|
|
|
|
# Put together a runtime image
|
|
FROM --platform=${BUILDPLATFORM} node:18-alpine
|
|
|
|
WORKDIR /syn2mas
|
|
|
|
COPY ./package.json ./package-lock.json ./
|
|
RUN --network=default \
|
|
npm ci --omit=dev
|
|
|
|
COPY --from=builder /syn2mas/dist ./dist
|
|
|
|
ENTRYPOINT ["node", "dist/index.js"]
|