Update Dockerfile
This commit is contained in:
+7
-19
@@ -1,5 +1,9 @@
|
|||||||
# ================================================
|
FROM debian:12
|
||||||
FROM oven/bun AS build
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y libstdc++6 && \
|
||||||
|
curl -fsSL https://bun.sh/install | bash && \
|
||||||
|
apt-get clean
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
@@ -9,10 +13,8 @@ COPY bun.lock bun.lock
|
|||||||
|
|
||||||
RUN bun install
|
RUN bun install
|
||||||
|
|
||||||
COPY ./src ./src
|
|
||||||
|
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
COPY ./src ./src
|
||||||
RUN bun build \
|
RUN bun build \
|
||||||
--compile \
|
--compile \
|
||||||
--minify-whitespace \
|
--minify-whitespace \
|
||||||
@@ -20,20 +22,6 @@ RUN bun build \
|
|||||||
--outfile server \
|
--outfile server \
|
||||||
src/index.ts
|
src/index.ts
|
||||||
|
|
||||||
# ================================================
|
|
||||||
FROM debian:12
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get install -y libstdc++6 && \
|
|
||||||
apt-get clean
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
COPY --from=build /app/server server
|
|
||||||
COPY --from=build /app/node_modules node_modules
|
|
||||||
|
|
||||||
ENV NODE_ENV=production
|
|
||||||
|
|
||||||
CMD ["./server"]
|
CMD ["./server"]
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|||||||
Reference in New Issue
Block a user