# syntax=docker/dockerfile:1.19.0 # This file is generated by Dofigen v2.6.0 # See https://github.com/lenra-io/dofigen # install FROM oven/bun@sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a AS install LABEL \ org.opencontainers.image.base.digest="sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a" \ org.opencontainers.image.base.name="docker.io/oven/bun:1.3.6" \ 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:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a AS build LABEL \ org.opencontainers.image.base.digest="sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a" \ org.opencontainers.image.base.name="docker.io/oven/bun:1.3.6" \ 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:c5f48c942c667e70d7e64b124cfc939c25a4a43207c0d14b45844d762dc1d50f AS runtime LABEL \ io.dofigen.version="2.6.0" \ org.opencontainers.image.authors="OpenStatus Team" \ org.opencontainers.image.base.digest="sha256:c5f48c942c667e70d7e64b124cfc939c25a4a43207c0d14b45844d762dc1d50f" \ 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 <