add first pass at a dockerfile

This commit is contained in:
nyanotech 2025-08-07 03:16:50 -07:00
parent fc1e288567
commit b5b876fd98
Signed by: nyanotech
GPG Key ID: 872740637E938731

17
Dockerfile Normal file
View File

@ -0,0 +1,17 @@
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"]