mirror of
https://github.com/versia-pub/server.git
synced 2025-12-07 00:48:18 +01:00
Cleanup Dockerfile
This commit is contained in:
parent
4a3de1fd9e
commit
6bff15f6d6
|
|
@ -1,12 +1,10 @@
|
||||||
# Use the official Bun image (Bun doesn't run well on Musl but this seems to work)
|
# Bun doesn't run well on Musl but this seems to work
|
||||||
# See all versions at https://hub.docker.com/r/oven/bun/tags
|
|
||||||
FROM imbios/bun-node:1.1.3-current-alpine as base
|
FROM imbios/bun-node:1.1.3-current-alpine as base
|
||||||
|
|
||||||
# Install dependencies into temp directory
|
# Install dependencies into temp directory
|
||||||
# This will cache them and speed up future builds
|
# This will cache them and speed up future builds
|
||||||
FROM base AS install
|
FROM base AS install
|
||||||
|
|
||||||
# Install with --production (exclude devDependencies)
|
|
||||||
RUN mkdir -p /temp
|
RUN mkdir -p /temp
|
||||||
COPY . /temp
|
COPY . /temp
|
||||||
WORKDIR /temp
|
WORKDIR /temp
|
||||||
|
|
@ -24,8 +22,7 @@ WORKDIR /temp
|
||||||
RUN bun run prod-build
|
RUN bun run prod-build
|
||||||
WORKDIR /temp/dist
|
WORKDIR /temp/dist
|
||||||
|
|
||||||
# copy production dependencies and source code into final image
|
# Copy production dependencies and source code into final image
|
||||||
# Alpine (musl) causes errors with Bun :(
|
|
||||||
FROM oven/bun:1.1.3-alpine
|
FROM oven/bun:1.1.3-alpine
|
||||||
|
|
||||||
# Create app directory
|
# Create app directory
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue