Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 1m5s
34 lines
616 B
Docker
34 lines
616 B
Docker
FROM node:22-bookworm
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
socat \
|
|
git \
|
|
python3 \
|
|
make \
|
|
g++ \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install pnpm
|
|
RUN corepack enable && corepack prepare pnpm@latest --activate
|
|
|
|
# Set up user
|
|
USER node
|
|
WORKDIR /home/node/app
|
|
|
|
# Copy application code
|
|
COPY --chown=node:node . .
|
|
|
|
# Build process
|
|
RUN pnpm install --frozen-lockfile
|
|
RUN pnpm build
|
|
RUN pnpm ui:build
|
|
|
|
# Fix permissions
|
|
USER root
|
|
RUN chown -R node:node /home/node/app
|
|
USER node
|
|
|
|
# Default command (can be overridden by docker-compose)
|
|
CMD ["node", "dist/index.js"]
|