# syntax=docker/dockerfile:1.11 # This file is generated by Dofigen v2.5.1 # See https://github.com/lenra-io/dofigen # install FROM oven/bun@sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4 AS install LABEL \ org.opencontainers.image.base.digest="sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4" \ org.opencontainers.image.base.name="docker.io/oven/bun:1.3.3" \ org.opencontainers.image.stage="install" WORKDIR /app/ RUN \ --mount=type=bind,target=bunfig.toml,source=bunfig.toml \ --mount=type=bind,target=package.json,source=package.json \ --mount=type=bind,target=apps/server/package.json,source=apps/server/package.json \ --mount=type=bind,target=packages/analytics/package.json,source=packages/analytics/package.json \ --mount=type=bind,target=packages/db/package.json,source=packages/db/package.json \ --mount=type=bind,target=packages/emails/package.json,source=packages/emails/package.json \ --mount=type=bind,target=packages/error/package.json,source=packages/error/package.json \ --mount=type=bind,target=packages/regions/package.json,source=packages/regions/package.json \ --mount=type=bind,target=packages/tinybird/package.json,source=packages/tinybird/package.json \ --mount=type=bind,target=packages/tracker/package.json,source=packages/tracker/package.json \ --mount=type=bind,target=packages/upstash/package.json,source=packages/upstash/package.json \ --mount=type=bind,target=packages/utils/package.json,source=packages/utils/package.json \ --mount=type=bind,target=packages/tsconfig/package.json,source=packages/tsconfig/package.json \ --mount=type=bind,target=packages/assertions/package.json,source=packages/assertions/package.json \ --mount=type=bind,target=packages/theme-store/package.json,source=packages/theme-store/package.json \ --mount=type=cache,target=/root/.bun/install/cache,sharing=locked \ bun install --production --frozen-lockfile --verbose # build FROM oven/bun@sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4 AS build LABEL \ org.opencontainers.image.base.digest="sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4" \ org.opencontainers.image.base.name="docker.io/oven/bun:1.3.3" \ org.opencontainers.image.stage="build" ENV NODE_ENV="production" WORKDIR /app/apps/server COPY \ --link \ "." "/app/" COPY \ --from=install \ --link \ "/app/node_modules" "/app/node_modules" RUN bun build --compile --sourcemap src/index.ts --outfile=app # runtime FROM debian@sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b AS runtime LABEL \ io.dofigen.version="2.5.1" \ org.opencontainers.image.authors="OpenStatus Team" \ org.opencontainers.image.base.digest="sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b" \ org.opencontainers.image.base.name="docker.io/debian:bullseye-slim" \ org.opencontainers.image.description="REST API server with Hono framework for OpenStatus" \ org.opencontainers.image.source="https://github.com/openstatusHQ/openstatus" \ org.opencontainers.image.title="OpenStatus Server" \ org.opencontainers.image.vendor="OpenStatus" COPY \ --from=build \ --chown=1000:1000 \ --chmod=555 \ --link \ "/app/apps/server/app" "/bin/" USER 0:0 RUN <