Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions packages/ai-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ---- Build Stage ----
FROM mcr.microsoft.com/cbl-mariner/base/python:3.12 AS builder
FROM mcr.microsoft.com/azurelinux/base/python:3.12 AS builder
WORKDIR /app

COPY packages/ai-service/requirements.txt .
Expand All @@ -11,13 +11,15 @@ RUN pip install --no-cache-dir \
--target=/deps -r requirements.txt

# ---- Production Stage ----
FROM mcr.microsoft.com/cbl-mariner/base/python:3.12 AS production
FROM mcr.microsoft.com/azurelinux/base/python:3.12 AS production
WORKDIR /app

# wget for the HEALTHCHECK; shadow-utils provides groupadd/useradd (not in the base image)
RUN tdnf install -y wget shadow-utils && tdnf clean all
RUN groupadd -r agentbase && useradd -r -g agentbase -s /sbin/nologin -M agentbase
RUN tdnf install -y wget

COPY --from=builder /deps /usr/local/lib/python3.12/site-packages
# Azure Linux's system interpreter resolves /usr/lib/python3.12/site-packages on sys.path
COPY --from=builder /deps /usr/lib/python3.12/site-packages
COPY packages/ai-service/app ./app

USER agentbase
Expand Down
7 changes: 4 additions & 3 deletions packages/core/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ---- Build Stage ----
FROM mcr.microsoft.com/cbl-mariner/base/nodejs:20 AS builder
FROM mcr.microsoft.com/azurelinux/base/nodejs:20 AS builder
WORKDIR /app

# Install pnpm
Expand Down Expand Up @@ -28,11 +28,12 @@ WORKDIR /app/packages/core
RUN npx nest build

# ---- Production Stage ----
FROM mcr.microsoft.com/cbl-mariner/base/nodejs:20 AS production
FROM mcr.microsoft.com/azurelinux/base/nodejs:20 AS production
WORKDIR /app

RUN corepack enable && corepack prepare pnpm@9 --activate
RUN tdnf install -y wget
# wget for the HEALTHCHECK; shadow-utils provides groupadd/useradd (not in the base image)
RUN tdnf install -y wget shadow-utils && tdnf clean all

# Copy built app
COPY --from=builder /app/packages/core/dist ./dist
Expand Down
7 changes: 4 additions & 3 deletions packages/frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ---- Build Stage ----
FROM mcr.microsoft.com/cbl-mariner/base/nodejs:20 AS builder
FROM mcr.microsoft.com/azurelinux/base/nodejs:20 AS builder
WORKDIR /app

RUN corepack enable && corepack prepare pnpm@9 --activate
Expand Down Expand Up @@ -30,10 +30,11 @@ ENV NEXT_PUBLIC_AI_URL=$NEXT_PUBLIC_AI_URL
RUN npx next build

# ---- Production Stage ----
FROM mcr.microsoft.com/cbl-mariner/base/nodejs:20 AS production
FROM mcr.microsoft.com/azurelinux/base/nodejs:20 AS production
WORKDIR /app

RUN tdnf install -y wget
# wget for the HEALTHCHECK; shadow-utils provides groupadd/useradd (not in the base image)
RUN tdnf install -y wget shadow-utils && tdnf clean all

COPY --from=builder /app/packages/frontend/.next/standalone ./
COPY --from=builder /app/packages/frontend/.next/static ./.next/static
Expand Down
Loading