more docker testing
This commit is contained in:
parent
0324b2fc99
commit
6e2437dbdd
19
Dockerfile
19
Dockerfile
@ -1,11 +1,14 @@
|
|||||||
FROM golang:1.14.6-alpine3.12
|
FROM golang:latest as builder
|
||||||
RUN mkdir /src
|
RUN mkdir -p /go/src/folder
|
||||||
ADD . /src
|
WORKDIR /go/src/folder
|
||||||
WORKDIR /src
|
COPY /src .
|
||||||
|
|
||||||
|
RUN go get -d
|
||||||
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -o main .
|
||||||
|
|
||||||
|
FROM alpine:latest
|
||||||
|
WORKDIR /
|
||||||
|
COPY --from=builder /go/src/folder/main .
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
RUN go get -u ./...
|
CMD ["/main"]
|
||||||
RUN go build -o main .
|
|
||||||
|
|
||||||
ENTRYPOINT ["/src/main"]
|
|
||||||
|
Loading…
Reference in New Issue
Block a user