Some checks failed
Main / build-and-push-docker-image (20.x) (push) Failing after 4m2s
35 lines
462 B
Docker
35 lines
462 B
Docker
FROM node:lts-slim AS base
|
|
|
|
# Create app directory
|
|
WORKDIR /app
|
|
|
|
# Enable Corepack
|
|
RUN corepack enable
|
|
|
|
# Set Yarn to the latest stable version
|
|
RUN yarn set version stable
|
|
|
|
# Files required by yarn install
|
|
COPY package.json yarn.lock ./
|
|
|
|
# Install app dependencies
|
|
RUN yarn install --immutable
|
|
|
|
# Type check app
|
|
# RUN yarn typecheck
|
|
|
|
COPY . .
|
|
|
|
|
|
FROM base AS runner
|
|
|
|
# Build app
|
|
COPY . .
|
|
|
|
RUN yarn build
|
|
|
|
USER node
|
|
|
|
# Start the app
|
|
EXPOSE 80
|
|
CMD ["yarn", "start"] |