From 54c6abc9e4a6666ed4d24f60dace334d2e8ecede Mon Sep 17 00:00:00 2001 From: simon987 Date: Sun, 5 Jul 2020 11:07:07 -0400 Subject: [PATCH] Docker --- Dockerfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..096f972 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +# Build +FROM golang:1.14 as go_build +WORKDIR /build/ + +COPY *.go go.mod ./ +RUN GOOS=linux CGO_ENABLED=0 go build -a -installsuffix cgo -o tt_drone_go . + +FROM ubuntu + +RUN apt update && apt install -y python3 python3-pip + +WORKDIR /root/ +COPY --from=go_build ["/build/tt_drone_go", "/root/"] + +ENTRYPOINT ["/root/tt_drone_go"] \ No newline at end of file