From d8a5bb93405a717da4ccd8881f0e5049137f323c Mon Sep 17 00:00:00 2001 From: Adrien Date: Thu, 9 Apr 2026 19:36:22 +0200 Subject: [PATCH] Adpat frontend to build docker image with buildah --- README.md | 17 +++++++++++++++-- backend/pom.xml | 7 +++++-- frontend/Dockerfile | 4 ++-- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8c6aaca..21c0af1 100644 --- a/README.md +++ b/README.md @@ -175,10 +175,23 @@ sdk use java 25-graalce # Build native executable + Docker image (requires Docker daemon) cd backend -mvn -Pnative package jib:dockerBuild -DskipTests +mvn -Pnative package jib:build -DskipTests +mvn -Pnative jib:build -Djib.to.auth.username=admin -Djib.to.auth.password="" ``` -The image `ai-teacher-backend:latest` will appear in your local Docker. It starts in under 1 second and uses significantly less memory than the JVM image. +### Frontend build +``` +buildah build \ + --platform linux/arm64 \ + --tag ai-teacher-frontend:latest \ + frontend/ +``` +To export it as a tarball: + +``` +buildah push ai-teacher-frontend:latest \ + oci-archive:/tmp/ai-teacher-frontend-arm64.tar +``` ### Run Native Stack (Docker Compose) diff --git a/backend/pom.xml b/backend/pom.xml index eb6088c..df4c016 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -164,10 +164,13 @@ gcr.io/distroless/base-nossl-debian12 - - ai-teacher-backend + zot.immich-ad.ovh/home/ai-teacher-backend + + latest + + OCI 8080 diff --git a/frontend/Dockerfile b/frontend/Dockerfile index ffe4a84..458a2e9 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,5 +1,5 @@ # ---- Build stage ---- -FROM node:20-alpine AS build +FROM docker.io/library/node:20-alpine AS build WORKDIR /app COPY package*.json ./ RUN npm ci @@ -7,7 +7,7 @@ COPY . . RUN npm run build # ---- Runtime stage (nginx) ---- -FROM nginx:alpine +FROM docker.io/library/nginx:alpine COPY --from=build /app/dist /usr/share/nginx/html COPY nginx.conf /etc/nginx/conf.d/default.conf EXPOSE 80