Skip to content

Instantly share code, notes, and snippets.

@Arlement
Last active September 10, 2024 02:02
Show Gist options
  • Select an option

  • Save Arlement/7f74921b3e71938b6ad10624ba2cb165 to your computer and use it in GitHub Desktop.

Select an option

Save Arlement/7f74921b3e71938b6ad10624ba2cb165 to your computer and use it in GitHub Desktop.
(Dockerfile) Bun + Prisma
# Use Linux-Based NodeJS Image as Base
FROM node:latest
# Install OpenSSL Library, required by Prisma
RUN apt-get install libssl3
# Set WorkDir
WORKDIR /app
# Copy Package Files
COPY package*.json ./
# Install Bun
RUN npm install -g bun
# Install Dependencies via Bun
RUN bun install
# Copy Code to Workdir
COPY . .
# Install Prisma CLI
RUN npm install -g prisma
# Generate Prisma Client
RUN prisma generate
# Start Application
CMD ["bun", "start"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment