diff options
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"] |
