-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into OPS-3276/can-history-pt-3
- Loading branch information
Showing
3 changed files
with
29 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
FROM oven/bun@sha256:5ba9a68692e9fd7aa435a79b2597f8211fbef2c6b0bed0ce9c9293c98fef5848 | ||
# Use the official Bun image (using a tag version for consistency) | ||
FROM oven/bun:1 AS base | ||
WORKDIR /usr/src/app | ||
|
||
# hadolint ignore=DL3008 | ||
RUN apt-get update && apt-get -y --no-install-recommends install unzip && apt-get clean && rm -rf /var/lib/apt/lists/* | ||
RUN useradd -ms /bin/bash app | ||
USER app | ||
WORKDIR /home/app | ||
|
||
COPY --chown=app:app ./package.json ./bun.lockb /home/app/ | ||
|
||
RUN bun install --production --frozen-lockfile | ||
|
||
COPY --chown=app:app index.html /home/app/ | ||
COPY --chown=app:app src /home/app/src | ||
COPY --chown=app:app public /home/app/public | ||
COPY --chown=app:app vite.config.mjs /home/app/ | ||
COPY --chown=app:app eslint.config.js /home/app/ | ||
# Stage to install only production dependencies | ||
FROM base AS prod-deps | ||
RUN mkdir -p /temp/prod | ||
COPY package.json bun.lockb /temp/prod/ | ||
WORKDIR /temp/prod | ||
RUN bun install --frozen-lockfile --production | ||
|
||
# Production image – copy only production dependencies and source code (assumes your code is prebuilt) | ||
FROM base AS release | ||
COPY --from=prod-deps /temp/prod/node_modules ./node_modules | ||
COPY . . | ||
# If you have a build step that does not rely on devDependencies, run it here | ||
CMD ["bun", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters