-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge in CI/github-actions-runner from fix/entrypoint-2 to master * commit '97313607cc5b49a716f70e0c8261b9538606fc76': create no-entrypoint dockerfile
- Loading branch information
Showing
3 changed files
with
30 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Stage 1: Build environment | ||
FROM node:20.12.2-bookworm-slim AS builder | ||
|
||
# Install PNPM globally with a specific version | ||
RUN npm install -g [email protected] | ||
|
||
# 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 |