diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..eba61a7 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +short \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5187b2c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM golang:1.12.1 as builder + +ENV CGO_ENABLED=0 + +ADD . /go/src/short + +WORKDIR /go/src/short + +RUN go get ./... && go build -o short . + +FROM scratch + +LABEL maintainer="Thomas Andrade " + +COPY --from=builder /go/src/short/short / + +ENTRYPOINT [ "/short" ] \ No newline at end of file