✨ use bun as package manager and runner for the docke rcontainer, plus some tweak on the github action
This commit is contained in:
19
Dockerfile
19
Dockerfile
@@ -1,32 +1,27 @@
|
||||
FROM node:20-slim as builder
|
||||
FROM oven/bun:1.2.2-slim as builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json yarn.lock ./
|
||||
COPY package.json bun.lock ./
|
||||
|
||||
COPY tsconfig.json ./
|
||||
|
||||
COPY packages packages
|
||||
|
||||
RUN export YARN_CACHE_FOLDER="$(mktemp -d)" \
|
||||
&& yarn install --frozen-lockfile \
|
||||
&& rm -r "$YARN_CACHE_FOLDER"
|
||||
RUN bun install --no-cache
|
||||
|
||||
RUN yarn build:action
|
||||
RUN bun run build:action
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
FROM node:20-slim
|
||||
FROM oven/bun:1.2.2-slim
|
||||
|
||||
WORKDIR /action-release
|
||||
|
||||
RUN export YARN_CACHE_FOLDER="$(mktemp -d)" \
|
||||
&& yarn add canvas@3.1.0 gifsicle@5.3.0 --no-lockfile \
|
||||
&& rm -r "$YARN_CACHE_FOLDER"
|
||||
RUN bun add canvas@3.1.0 gifsicle@5.3.0 --no-lockfile --no-cache
|
||||
|
||||
COPY --from=builder /app/packages/action/dist/ /action-release/
|
||||
|
||||
CMD ["node", "/action-release/index.js"]
|
||||
|
||||
CMD ["bun", "/action-release/index.js"]
|
||||
|
||||
Reference in New Issue
Block a user