mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38:19 +01:00
refactor: 🚨 Consolidate consecutive RUN calls
This commit is contained in:
parent
3fade63567
commit
bec3e4ea70
|
|
@ -1,10 +1,9 @@
|
||||||
# Bun doesn't run well on Musl but this seems to work
|
# Bun doesn't run well on Musl but this seems to work
|
||||||
FROM oven/bun:1.1.29-alpine as base
|
FROM oven/bun:1.1.29-alpine as base
|
||||||
|
|
||||||
RUN apk add --no-cache libstdc++ git=^2.0.0 bash^5.0.0 curl^8.0.0 openssh^9.7.0 cloc^2.0.0
|
|
||||||
|
|
||||||
# Switch to Bash by editing /etc/passwd
|
# Switch to Bash by editing /etc/passwd
|
||||||
RUN sed -i -e 's|/bin/ash|/bin/bash|g' /etc/passwd
|
RUN apk add --no-cache libstdc++ git=^2.0.0 bash^5.0.0 curl^8.0.0 openssh^9.7.0 cloc^2.0.0 &&
|
||||||
|
sed -i -e 's|/bin/ash|/bin/bash|g' /etc/passwd
|
||||||
|
|
||||||
# Extract Node from its docker image (node:22-alpine)
|
# Extract Node from its docker image (node:22-alpine)
|
||||||
COPY --from=node:22-alpine /usr/local/bin/node /usr/local/bin/node
|
COPY --from=node:22-alpine /usr/local/bin/node /usr/local/bin/node
|
||||||
|
|
@ -28,10 +28,10 @@ WORKDIR /temp/dist
|
||||||
# Copy production dependencies and source code into final image
|
# Copy production dependencies and source code into final image
|
||||||
FROM oven/bun:1.1.29-alpine
|
FROM oven/bun:1.1.29-alpine
|
||||||
|
|
||||||
RUN apk add --no-cache libstdc++^14.0.0
|
# Install libstdc++ for Bun and create app directory
|
||||||
|
RUN apk add --no-cache libstdc++^14.0.0 &&
|
||||||
|
mkdir -p /app
|
||||||
|
|
||||||
# Create app directory
|
|
||||||
RUN mkdir -p /app
|
|
||||||
COPY --from=build /temp/dist /app/dist
|
COPY --from=build /temp/dist /app/dist
|
||||||
COPY entrypoint.sh /app
|
COPY entrypoint.sh /app
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue