corentinth-it-tools
SUCCESS
4m 41s
History Source
SummaryIterations1Transcript7Dockerfile
01Iteration 1
WRITEWriteFile· step #1
0s
Dockerfile714 bytes written
text31 lines · 714 chars
# build stage
FROM node:slim AS build-stage

# Set environment variables for non-interactive npm installs
ENV NPM_CONFIG_LOGLEVEL=warn
ENV CI true
WORKDIR /app

# Install dependencies
COPY package.json pnpm-lock.yaml ./
RUN npm install -g pnpm && pnpm i --frozen-lockfile

# Copy the rest of the application and build
COPY . .
RUN pnpm build

# production stage
FROM nginx:stable-alpine3.23-perl AS production-stage

# Copy built assets from build stage to nginx html folder
COPY --from=build-stage /app/dist /usr/share/nginx/html

# Copy nginx config (must exist in repo)
COPY nginx.conf /etc/nginx/conf.d/default.conf

# Expose port 80
EXPOSE 80

# Run nginx in the foreground
CMD ["nginx", "-g", "daemon off;"]
WRITEWriteFile· step #2
0s
.dockerignore85 bytes written
dockerignore11 lines · 85 chars
__pycache__
node_modules
dist
.git
build
.DS_Store
*.log
.npm*
*.lock
pnpm-lock.yaml
WRITEWriteFile· step #3
0s
./.dockerignore85 bytes written
dockerignore11 lines · 85 chars
__pycache__
node_modules
dist
.git
build
.DS_Store
*.log
.npm*
*.lock
pnpm-lock.yaml
VERIFYVerifyBuild· step #4
56s
VerifyBuildbuild_failed
Build error
Exact error message and exit code
- Error: ERROR: failed to build: failed to solve: failed to compute cache key: failed to calculate checksum of ref iid49ux0yc7voohd3ofrrtug9::qwdaj8n76e9pmrfsrscc48yl6: "/pnpm-lock.yaml": not found
- Exit code: not shown in the log excerpt

Failing command/step
- [build-stage 3/6] COPY package.json pnpm-lock.yaml ./:

Missing packages or files mentioned
- Missing file: /pnpm-lock.yaml (not found in the build context)

Version mismatch info (base image references)
- The build uses multi-stage with explicit image digests:
  - nginx base: FROM docker.io/library/nginx:stable-alpine3.23-perl@sha256:f921cf77aafa94410e574a6de6c8188b6d5c6f3e65f5ff1ef24f117cfc666e37
  - node base for another stage: FROM docker.io/library/node:slim@sha256:44bcbf493408a824104e74976ae5539f596c46cbe75ed0423a137552a555e2de

Notes
- The error occurs during copying dependencies; there is a warning about ENV formatting, but the main failure is the missing pnpm-lock.yaml.
WRITEWriteFile· step #5
0s
.dockerignore70 bytes written
dockerignore10 lines · 70 chars
__pycache__
node_modules
dist
.git
build
.DS_Store
*.log
.npm*
*.lock
WRITEWriteFile· step #6
1s
Dockerfile672 bytes written
text29 lines · 672 chars
# build stage
FROM node:slim AS build-stage

# Set environment variables for non-interactive npm installs
ENV NPM_CONFIG_LOGLEVEL=warn
ENV CI true
WORKDIR /app

# Copy the entire project and install dependencies then build
COPY . .

RUN npm install -g pnpm && pnpm i --frozen-lockfile
RUN pnpm build

# production stage
FROM nginx:stable-alpine3.23-perl AS production-stage

# Copy built assets from build stage to nginx html folder
COPY --from=build-stage /app/dist /usr/share/nginx/html

# Copy nginx config (must exist in repo)
COPY nginx.conf /etc/nginx/conf.d/default.conf

# Expose port 80
EXPOSE 80

# Run nginx in the foreground
CMD ["nginx", "-g", "daemon off;"]
VERIFYVerifyBuild· step #7
1m 58s
VerifyBuildaccepted
Smoke [PASS]: test -f /usr/share/nginx/html/index.html
Smoke [PASS]: test -f /etc/nginx/conf.d/default.conf
Smoke [PASS]: ls -l /usr/share/nginx/html