-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (20 loc) · 760 Bytes
/
Dockerfile
File metadata and controls
29 lines (20 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Stage 1: Build environment
FROM node:20.12.2-bookworm-slim AS builder
# Install PNPM globally with a specific version
RUN npm install -g pnpm@8.15.7
# Set the working directory in the Docker image
WORKDIR /app
# Copy package.json and pnpm-lock.yaml first for better caching
COPY package.json pnpm-lock.yaml ./
# Install dependencies
RUN pnpm install --frozen-lockfile
# Copy the rest of your app's source code
COPY . .
# Build your app
RUN pnpm run build
# Stage 2: Runtime environment
FROM node:20.12.2-bookworm-slim AS runtime
# Copy only the built executable and set permissions
COPY --from=builder /app/dist/bin/index.js /usr/local/bin/github-actions-runner
RUN chmod +x /usr/local/bin/github-actions-runner
ENTRYPOINT ["github-actions-runner"]