hakimel-reveal-js
SUCCESS
3m 44s
History Source
SummaryIterations1Transcript2Dockerfile
01Iteration 1
WRITEWriteFile· step #1
1s
Dockerfile744 bytes written
text27 lines · 744 chars
FROM node:20-slim AS build
WORKDIR /app

# Install dependencies
COPY package.json package-lock.json ./
RUN npm ci

# Copy source and build
COPY . .
RUN npm run build

# Runtime stage: serve static files with nginx
FROM nginx:stable-alpine AS runtime

# Copy built assets from build stage
COPY --from=build /app/dist /usr/share/nginx/html/dist
COPY --from=build /app/css /usr/share/nginx/html/css
COPY --from=build /app/js /usr/share/nginx/html/js
COPY --from=build /app/plugin /usr/share/nginx/html/plugin
COPY --from=build /app/index.html /usr/share/nginx/html/index.html
COPY --from=build /app/demo.html /usr/share/nginx/html/demo.html
COPY --from=build /app/public /usr/share/nginx/html/public

EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]
VERIFYVerifyBuild· step #2
2m 10s
VerifyBuildaccepted
Concerns: Build stage expects output in /app/dist and other assets; if npm run build outputs to a different path, COPY steps will fail., Copying /app/index.html into /usr/share/nginx/html/index.html and /app/dist into /usr/share/nginx/html/dist may be redundant if build already copies index.html to dist., No HEALTHCHECK defined to detect runtime health (could be added).
Smoke [PASS]: test -f /usr/share/nginx/html/index.html
Smoke [PASS]: test -d /usr/share/nginx/html/dist
Smoke [PASS]: test -d /usr/share/nginx/html/css && test -d /usr/share/nginx/html/js && test -d /usr/share/nginx/html/plugin