13 lines
274 B
Docker
13 lines
274 B
Docker
|
|
FROM golang:1.24-alpine AS builder
|
||
|
|
WORKDIR /build
|
||
|
|
COPY go.mod go.sum ./
|
||
|
|
RUN go mod download
|
||
|
|
COPY . .
|
||
|
|
RUN CGO_ENABLED=0 go build -o /restxlsx .
|
||
|
|
|
||
|
|
FROM scratch
|
||
|
|
COPY --from=builder /restxlsx /restxlsx
|
||
|
|
COPY data/sample.xlsx /data/sample.xlsx
|
||
|
|
EXPOSE 8080
|
||
|
|
ENTRYPOINT ["/restxlsx"]
|