File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4242 - /bin/sh
4343 - -c
4444 - |
45- if [ -f yarn.lock ]; then
46- yarn --frozen-lockfile || yarn install
45+ if [ -f bun.lock ]; then
46+ bun install --frozen-lockfile || bun install
47+ elif [ -f yarn.lock ]; then
48+ yarn install --frozen-lockfile || yarn install
4749 elif [ -f package-lock.json ]; then
4850 npm ci || npm install
4951 elif [ -f pnpm-lock.yaml ]; then
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ RUN corepack enable
1414ENV PNPM_HOME="/pnpm"
1515ENV PATH="$PNPM_HOME:$PATH"
1616
17+ COPY --from=oven/bun:1.3.11 /usr/local/bin/bun /usr/local/bin/bun
18+
1719# Install dependencies only when needed
1820FROM base AS deps
1921ARG FOLDER
@@ -23,7 +25,8 @@ WORKDIR ${FOLDER}
2325
2426# Install dependencies based on the preferred package manager
2527RUN \
26- if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
28+ if [ -f bun.lockb ] || [ -f bun.lock ]; then bun install --frozen-lockfile || bun install;
29+ elif [ -f yarn.lock ]; then yarn install --frozen-lockfile || yarn install; \
2730 elif [ -f package-lock.json ]; then npm ci || npm i; \
2831 elif [ -f pnpm-lock.yaml ]; then pnpm i --frozen-lockfile || pnpm i; \
2932 else echo "Lockfile not found." && exit 1; \
@@ -37,7 +40,8 @@ WORKDIR ${FOLDER}
3740COPY --from=deps ${FOLDER}/node_modules ./node_modules
3841
3942RUN \
40- if [ -f yarn.lock ]; then yarn run build; \
43+ if [ -f bun.lockb ] || [ -f bun.lock ]; then bun run build; \
44+ elif [ -f yarn.lock ]; then yarn run build; \
4145 elif [ -f package-lock.json ]; then npm run build; \
4246 elif [ -f pnpm-lock.yaml ]; then pnpm run build; \
4347 else echo "Lockfile not found." && exit 1; \
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ ENV PATH="$PNPM_HOME:$PATH"
1313RUN mkdir -p /home/codespace/.pnpm-store /pnpm \
1414 && chown -R 1000:1000 /home/codespace/.pnpm-store /pnpm
1515
16+ COPY --from=oven/bun:1.3.11 /usr/local/bin/bun /usr/local/bin/bun
17+
1618COPY . /app
1719WORKDIR ${FOLDER}
1820
You can’t perform that action at this time.
0 commit comments