From 4a98ff511ef0a31d9f9650751ca2648d25e23b35 Mon Sep 17 00:00:00 2001 From: Mauro Scomparin Date: Wed, 26 Feb 2020 22:24:38 +0100 Subject: [PATCH] moved test and created Dockerfile --- Dockerfile | 10 ++++++++++ test/server_test.go => server_test.go | 0 2 files changed, 10 insertions(+) create mode 100644 Dockerfile rename test/server_test.go => server_test.go (100%) diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4ddf89e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM golang:alpine as builder +RUN mkdir /build +ADD . /build/ +WORKDIR /build +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -tags netgo -ldflags '-w' -o server server.go + +FROM scratch +COPY --from=builder /build/server /app/ +WORKDIR /app +CMD ["./server"] diff --git a/test/server_test.go b/server_test.go similarity index 100% rename from test/server_test.go rename to server_test.go -- 2.25.1