22 lines
286 B
Docker
22 lines
286 B
Docker
|
|
FROM golang:1.22 AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
RUN GOOS=linux go build -o librapi main.go
|
|
|
|
|
|
FROM debian:bookworm-slim
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/librapi .
|
|
RUN chmod +x /app/librapi
|
|
RUN mkdir -p /app/store
|
|
|
|
CMD ["./librapi"] |