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
|
||||
RUN mkdir /src
|
||||
ADD . /src
|
||||
WORKDIR /src
|
||||
FROM golang:latest as builder
|
||||
RUN mkdir -p /go/src/folder
|
||||
WORKDIR /go/src/folder
|
||||
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
|
||||
|
||||
RUN go get -u ./...
|
||||
RUN go build -o main .
|
||||
|
||||
ENTRYPOINT ["/src/main"]
|
||||
CMD ["/main"]
|
||||
|
Loading…
Reference in New Issue
Block a user