mirror of
https://github.com/nyanotech/object-holder.git
synced 2025-12-16 03:20:25 -08:00
18 lines
298 B
Docker
18 lines
298 B
Docker
FROM golang:1.22-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY main.go ./
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o object-holder .
|
|
|
|
FROM alpine:latest
|
|
|
|
WORKDIR /root/
|
|
|
|
COPY --from=builder /app/object-holder .
|
|
|
|
ENTRYPOINT ["./object-holder"]
|