# Containerize Frontend with Docker - **Name / Title**: Containerize the Next.js Frontend - **Complexity**: Medium - **Task Type**: DevOps - **Description**: The Next.js frontend must be containerized for Google Cloud Run using Next.js standalone output tracing optimization. - **Technical Requirement**: Docker, Next.js. - **Estimated time to deliver**: 4 hours - **Acceptance criteria**: - `next.config.ts` is updated to include `output: 'standalone'`. - A valid, multi-stage `Dockerfile` is placed at the root of the frontend repository. - The container runs successfully and serves the UI on the defined port. - **MUST DOs**: - Optimize the build to only copy necessary standalone files to the final runner stage. - Expose default Cloud Run expectations (port 8080/3000) inside the Dockerfile via `ENV PORT`. - **References**: - Repo: `skillcert-frontend` - Files: `Dockerfile`, `.dockerignore`, `next.config.ts`
Containerize Frontend with Docker
next.config.tsis updated to includeoutput: 'standalone'.Dockerfileis placed at the root of the frontend repository.ENV PORT.skillcert-frontendDockerfile,.dockerignore,next.config.ts