diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..094a019 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM golang:alpine AS build + +WORKDIR /root/ +COPY * /root/ +RUN go build -o /root/matrix-handler cmd/svr/main.go + +FROM scratch +COPY --from=build /root/matrix-handler /bin/matrix-handler +ENTRYPOINT ["/bin/matrix-handler"] \ No newline at end of file diff --git a/deploy/Dockerfile b/deploy/Dockerfile deleted file mode 100644 index a9b83d8..0000000 --- a/deploy/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM golang:alpine - -RUN go build -o /root/matrix-handler cmd/svr/main.go - -WORKDIR /root/ -CMD ["./matrix-handler"]