Cleanup Dockerfile

This commit is contained in:
Jesse Wierzbinski 2024-04-13 18:15:15 -10:00
parent 4a3de1fd9e
commit 6bff15f6d6
No known key found for this signature in database

View file

@ -1,12 +1,10 @@
# Use the official Bun image (Bun doesn't run well on Musl but this seems to work)
# See all versions at https://hub.docker.com/r/oven/bun/tags
# Bun doesn't run well on Musl but this seems to work
FROM imbios/bun-node:1.1.3-current-alpine as base
# Install dependencies into temp directory
# This will cache them and speed up future builds
FROM base AS install
# Install with --production (exclude devDependencies)
RUN mkdir -p /temp
COPY . /temp
WORKDIR /temp
@ -24,8 +22,7 @@ WORKDIR /temp
RUN bun run prod-build
WORKDIR /temp/dist
# copy production dependencies and source code into final image
# Alpine (musl) causes errors with Bun :(
# Copy production dependencies and source code into final image
FROM oven/bun:1.1.3-alpine
# Create app directory