Moving Dockerfile, multistage build
This commit is contained in:
parent
128ee5d5a7
commit
8c595faa27
9
Dockerfile
Normal file
9
Dockerfile
Normal file
@ -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"]
|
@ -1,6 +0,0 @@
|
|||||||
FROM golang:alpine
|
|
||||||
|
|
||||||
RUN go build -o /root/matrix-handler cmd/svr/main.go
|
|
||||||
|
|
||||||
WORKDIR /root/
|
|
||||||
CMD ["./matrix-handler"]
|
|
Loading…
Reference in New Issue
Block a user