infoscreen/Dockerfile

21 lines
546 B
Docker
Raw Normal View History

2022-01-06 20:21:37 +01:00
FROM node:alpine AS builder
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
ENV GATSBY_TELEMETRY_DISABLED 1
RUN npm run build
2022-01-06 19:50:43 +01:00
2022-01-06 20:21:37 +01:00
FROM node:alpine AS runner
WORKDIR /app
RUN addgroup -g 1001 -S gatsby
RUN adduser -S gatsby -u 1001
COPY --from=builder /app/public ./public
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./package.json
USER gatsby
EXPOSE 9000
ENV PORT 9000
ENV GATSBY_TELEMETRY_DISABLED 1
CMD ["node_modules/.bin/gatsby", "serve"]