Skip to content

Commit

Permalink
feat(Dockerfile): simplify Dockerfile by combining COPY commands and …
Browse files Browse the repository at this point in the history
…add entrypoint script for better process management

feat(entrypoint.sh): create entrypoint script to handle dependency installation and application startup
  • Loading branch information
0xJord4n committed Dec 23, 2024
1 parent 173c171 commit fefc7e4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
15 changes: 6 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
FROM oven/bun:latest as base

# Copy the lock and package file
COPY bun.lockb .
COPY package.json .

# Install dependencies
RUN bun install

RUN ls -al node_modules/@actions/core
COPY bun.lockb package.json ./

# Copy source code
COPY src ./src

# Run the action
CMD ["bun", "run", "src/index.ts"]
COPY entrypoint.sh /entrypoint.sh

RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
4 changes: 4 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh -l

bun install
bun run src/index.ts

0 comments on commit fefc7e4

Please sign in to comment.