Files
stock-checker/Dockerfile
2025-11-28 20:10:15 +08:00

10 lines
266 B
Docker

FROM golang:1.25-alpine AS builder
WORKDIR /build
COPY main.go .
RUN go build -ldflags="-s -w" -o stock-checker main.go
FROM alpine:latest
WORKDIR /app
COPY --from=builder /build/stock-checker .
RUN chmod +x stock-checker
EXPOSE 8080
CMD ["./stock-checker"]