add build args and temporarily remove alpine
This commit is contained in:
parent
6c6da94fa6
commit
097f9177b3
20
Dockerfile
20
Dockerfile
@ -1,28 +1,36 @@
|
||||
FROM node:14-alpine as deps
|
||||
FROM node:14 as deps
|
||||
|
||||
RUN apk add --no-cache libc6-compat
|
||||
WORKDIR /app
|
||||
COPY calendso/package.json calendso/yarn.lock ./
|
||||
COPY calendso/prisma prisma
|
||||
RUN yarn install --frozen-lockfile
|
||||
|
||||
FROM node:14-alpine as builder
|
||||
FROM node:14 as builder
|
||||
|
||||
WORKDIR /app
|
||||
ARG BASE_URL
|
||||
ENV BASE_URL $BASE_URL
|
||||
ARG NEXT_PUBLIC_APP_URL
|
||||
ENV NEXT_PUBLIC_APP_URL $NEXT_PUBLIC_APP_URL
|
||||
|
||||
COPY calendso .
|
||||
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
RUN yarn build && yarn install --production --ignore-scripts --prefer-offline
|
||||
|
||||
FROM node:14-alpine as runner
|
||||
FROM node:14 as runner
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV production
|
||||
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
COPY --from=builder /app/prisma ./prisma
|
||||
COPY --from=builder /app/scripts ./scripts
|
||||
COPY --from=builder /app/next.config.js ./
|
||||
COPY --from=builder /app/next-i18next.config.js ./
|
||||
COPY --from=builder /app/public ./public
|
||||
COPY --from=builder /app/.next ./.next
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
COPY --from=builder /app/package.json ./package.json
|
||||
COPY --from=builder /app/prisma ./prisma
|
||||
COPY scripts scripts
|
||||
|
||||
EXPOSE 3000
|
||||
CMD ["/app/scripts/start.sh"]
|
||||
|
Loading…
Reference in New Issue
Block a user