mirror of
https://github.com/outline/outline.git
synced 2026-11-28 16:19:46 +03:00
28 lines
658 B
Docker
28 lines
658 B
Docker
ARG APP_PATH=/opt/outline
|
|
FROM node:20-slim AS deps
|
|
|
|
# Install build-essential and other required dependencies
|
|
RUN apt-get update && apt-get install -y build-essential
|
|
|
|
# Clean up unnecessary files to reduce image size
|
|
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
ARG APP_PATH
|
|
WORKDIR $APP_PATH
|
|
COPY ./package.json ./yarn.lock ./
|
|
COPY ./patches ./patches
|
|
|
|
RUN yarn install --no-optional --frozen-lockfile --network-timeout 1000000 && \
|
|
yarn cache clean
|
|
|
|
COPY . .
|
|
ARG CDN_URL
|
|
RUN yarn build
|
|
|
|
RUN rm -rf node_modules
|
|
|
|
RUN yarn install --production=true --frozen-lockfile --prefer-offline --network-timeout 1000000 && \
|
|
yarn cache clean
|
|
|
|
ENV PORT=3000
|