Clone git repo in container.
All checks were successful
homepanel/HomePanel/pipeline/head This commit looks good
All checks were successful
homepanel/HomePanel/pipeline/head This commit looks good
This commit is contained in:
parent
58e3e33941
commit
f698604028
@ -4,31 +4,26 @@
|
||||
ARG BUILD_FROM
|
||||
FROM ${BUILD_FROM}
|
||||
|
||||
# Install Node.js and pnpm
|
||||
RUN apk add --no-cache nodejs npm && npm install -g pnpm
|
||||
# Install Node.js, pnpm, and git
|
||||
RUN apk add --no-cache nodejs npm git && npm install -g pnpm
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files first for better caching
|
||||
COPY package.json pnpm-workspace.yaml pnpm-lock.yaml ./
|
||||
COPY packages/server/package.json ./packages/server/
|
||||
COPY packages/client/package.json ./packages/client/
|
||||
# Clone the repository
|
||||
ARG HOMEPANEL_VERSION=main
|
||||
RUN git clone --depth 1 --branch ${HOMEPANEL_VERSION} https://github.com/HomePanel/HomePanel.git .
|
||||
|
||||
# Install dependencies
|
||||
RUN pnpm install --frozen-lockfile
|
||||
|
||||
# Copy source code
|
||||
COPY packages/server ./packages/server
|
||||
COPY packages/client ./packages/client
|
||||
|
||||
# Build the client
|
||||
RUN pnpm --filter client build
|
||||
|
||||
# Create data directory
|
||||
RUN mkdir -p /data
|
||||
|
||||
# Copy root filesystem (for HA addon mode)
|
||||
# Copy root filesystem (for HA addon mode) - from build context
|
||||
COPY rootfs /
|
||||
|
||||
# Environment variables
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user