evanw-esbuild
SUCCESS
2m 32s
History Source
SummaryIterations1Transcript3Dockerfile
01Iteration 1
WRITEWriteFile· step #1
0s
Dockerfile623 bytes written
text28 lines · 623 chars
FROM golang:1.13-buster AS builder
WORKDIR /src

# Cache Go module downloads by first copying go.mod and go.sum
COPY go.mod go.sum ./
RUN go mod download

# Copy the rest of the source
COPY . ./

ENV CGO_ENABLED=0

# Build esbuild binary
RUN go build -trimpath -ldflags "-s -w" -o esbuild ./cmd/esbuild

# Final runtime image
FROM debian:bullseye-slim

# Install CA certificates for HTTPS requests at runtime
RUN apt-get update && \
    apt-get install -y --no-install-recommends ca-certificates && \
    rm -rf /var/lib/apt/lists/*

COPY --from=builder /src/esbuild /esbuild
RUN chmod +x /esbuild

ENTRYPOINT ["/esbuild"]
WRITEWriteFile· step #2
0s
.dockerignore90 bytes written
dockerignore7 lines · 90 chars
# Node, Go modules, and environment metadata
node_modules
*.log
.DS_Store
.git
.gitignore
VERIFYVerifyBuild· step #3
1m 00s
VerifyBuildaccepted
Concerns: Builder base image golang:1.13-buster is quite old (Debian Buster). Consider updating to a newer Go image for security and compatibility., No explicit tests in the Dockerfile to verify the build output beyond compilation; smoke tests will cover runtime behavior, which is fine, but adding a lightweight CI check could help guard against breakages.
Smoke [PASS]: /esbuild --version
Smoke [PASS]: /esbuild --help
Smoke [PASS]: test -x /esbuild