From d75f795fbc4c24a1985b4f60d797c10db6c00342 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quentin=20Guid=C3=A9e?= Date: Sun, 24 Sep 2023 00:20:57 -0400 Subject: [PATCH] Create Dockerfile for Vertex MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Quentin Guidée --- Dockerfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..95c2c3ed --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM golang:1.20-alpine AS build-stage + +WORKDIR /app + +COPY go.mod go.sum ./ +RUN go mod download + +COPY . ./ + +RUN go build -o /vertex + +FROM build-stage AS test-stage +RUN go test -v ./... + +FROM alpine AS run-stage + +WORKDIR / + +COPY --from=build-stage /vertex /vertex + +EXPOSE 6130 + +CMD /vertex