FROM oven/bun:1.3.14 # Create a non-root user with RUN useradd -m -u 2000 user USER user ENV PATH="/home/user/.local/bin:$PATH" # Set working directory WORKDIR /app # COPY --chown=user bun.lockb bun.lockb COPY --chown=user package.json package.json RUN bun install # Copy the rest of the application source COPY --chown=user . /app # Expose the port if needed (optional, depending on the hosting environment) EXPOSE 7860 CMD ["bun", "app.js"]