evanw-esbuild
SUCCESS
3m 31s
History Source
SummaryIterations1Transcript5Dockerfile
01Iteration 1
WRITEWriteFile· step #1
0s
Dockerfile948 bytes written
text39 lines · 948 chars
# Stage 1: Build esbuild from source
FROM golang:tip-alpine3.23 AS builder

# Install build tools
RUN apk add --no-cache make bash curl

WORKDIR /src

# Copy Go module files first for better caching
COPY go.mod go.sum ./
RUN go mod download

# Copy the rest of the source
COPY . .

# Build esbuild from source (CGO_ENABLED=0 is set in the Makefile)
RUN make esbuild

# Stage 2: Minimal runtime image
FROM alpine:3.23

# Ensure TLS certs are available (for any network access the binary might need)
RUN apk add --no-cache ca-certificates

# Create a non-root user to run the binary safely
RUN adduser -D esbuild

# Copy the built binary from the builder stage
COPY --from=builder /src/esbuild /usr/local/bin/esbuild

# Set permissions and user
RUN chown esbuild:esbuild /usr/local/bin/esbuild
USER esbuild
WORKDIR /home/esbuild

# Default command: show help, but allow overrides on container run
ENTRYPOINT ["/usr/local/bin/esbuild"]
CMD ["--help"]
WRITEWriteFile· step #2
0s
.dockerignore166 bytes written
dockerignore25 lines · 166 chars
git
node_modules
vendor
.tmp
.eslintrc.js
.DS_Store
*.log
*.tmp
build
dist
*.out
*.exe
*.dll
*.zip
*.tar.gz
*.tar
*.tgz
*.rg
*.png
*.jpg
*.jpeg
*.svg
*.wasm
.esbuild
VERIFYVerifyBuild· step #3
1m 09s
VerifyBuildbuild_failed
Build error
Summary:
- Failing step/command: RUN make esbuild (builder stage 7/7)
- Exact error messages and exit code:
  - node scripts/esbuild.js --update-version-go
  - make: node: No such file or directory
  - make: *** [Makefile:317: version-go] Error 127
  - ERROR: process "/bin/sh -c make esbuild" did not complete successfully: exit code: 2
- Missing packages/files mentioned:
  - Node.js binary is missing (node: No such file or directory), causing the esbuild script to fail.
- Version mismatch information:
  - No explicit version mismatch reported. Base images shown include Alpine 3.23 and golang:tip-alpine3.23, but Node is not installed in the builder image.
WRITEWriteFile· step #4
0s
Dockerfile959 bytes written
text39 lines · 959 chars
# Stage 1: Build esbuild from source
FROM golang:tip-alpine3.23 AS builder

# Install build tools
RUN apk add --no-cache make bash curl nodejs npm

WORKDIR /src

# Copy Go module files first for better caching
COPY go.mod go.sum ./
RUN go mod download

# Copy the rest of the source
COPY . .

# Build esbuild from source (CGO_ENABLED=0 is set in the Makefile)
RUN make esbuild

# Stage 2: Minimal runtime image
FROM alpine:3.23

# Ensure TLS certs are available (for any network access the binary might need)
RUN apk add --no-cache ca-certificates

# Create a non-root user to run the binary safely
RUN adduser -D esbuild

# Copy the built binary from the builder stage
COPY --from=builder /src/esbuild /usr/local/bin/esbuild

# Set permissions and user
RUN chown esbuild:esbuild /usr/local/bin/esbuild
USER esbuild
WORKDIR /home/esbuild

# Default command: show help, but allow overrides on container run
ENTRYPOINT ["/usr/local/bin/esbuild"]
CMD ["--help"]
VERIFYVerifyBuild· step #5
1m 06s
VerifyBuildaccepted
Concerns: FROM golang:tip-alpine3.23 is a moving tag; pin to a specific version for reproducible builds., Final stage uses Alpine; ensure the built esbuild binary is compatible with musl if you rely on static linking.
Smoke [PASS]: /usr/local/bin/esbuild --help
Smoke [PASS]: command -v esbuild
Smoke [PASS]: /usr/local/bin/esbuild --help | head -n 1