Files
memory-stress-test/Dockerfile

11 lines
399 B
Docker

FROM golang:1.25-bookworm AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY main.go .
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o memory-stress-test .
FROM ubuntu:24.04
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates && rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/memory-stress-test /usr/local/bin/
ENTRYPOINT ["memory-stress-test"]