diff options
| author | Leonardo Bishop <me@leonardobishop.net> | 2026-01-07 23:39:53 +0000 |
|---|---|---|
| committer | Leonardo Bishop <me@leonardobishop.net> | 2026-01-07 23:39:53 +0000 |
| commit | 03cd6bdfbd473dba3f3dc50a1b15e389aac5bc70 (patch) | |
| tree | 5fea2b1840e298aaab953add749fb9226bd4a710 /Dockerfile | |
Initial commit
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9da38ea --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +FROM golang:1.25-alpine AS builder + +WORKDIR /build + +COPY go.mod go.sum ./ + +RUN go mod download + +COPY . . + +ARG namespace=net.leonardobishop.instancer + +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-X 'git.leonardobishop.net/instancer/pkg/deployer.Namespace=$namespace'" -o . + + + +FROM alpine + +WORKDIR /app + +COPY --from=builder /build/instancer . + +EXPOSE 8080 + +CMD ["/app/instancer"] |
