Skip to content

Commit

Permalink
fix: use oven/bun
Browse files Browse the repository at this point in the history
  • Loading branch information
hamster1963 committed Sep 23, 2024
1 parent 669652b commit 4d8f69e
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,11 @@
FROM node:18-alpine AS base
FROM oven/bun:1 AS base

FROM base AS deps
RUN apk add --no-cache libc6-compat
WORKDIR /app

# Install glibc to run Bun
RUN if [[ $(uname -m) == "aarch64" ]] ; \
then \
# aarch64
wget https://raw.githubusercontent.com/squishyu/alpine-pkg-glibc-aarch64-bin/master/glibc-2.26-r1.apk ; \
apk add --no-cache --allow-untrusted --force-overwrite glibc-2.26-r1.apk ; \
rm glibc-2.26-r1.apk ; \
else \
# x86_64
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.28-r0/glibc-2.28-r0.apk ; \
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub ; \
apk add --no-cache --force-overwrite glibc-2.28-r0.apk ; \
rm glibc-2.28-r0.apk ; \
fi

COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* bun.lockb* ./
RUN npm install -g bun && bun install
RUN bun install


FROM base AS builder
Expand Down

0 comments on commit 4d8f69e

Please sign in to comment.